IndexSet Class Reference

#include <IndexSet.h>

List of all members.

Public Member Functions

 IndexSet (unsigned int *pBuf, unsigned int size)
 IndexSet ()
 ~IndexSet ()
void setData (unsigned int *pBuf, unsigned int size)
unsigned int size () const
bool find (unsigned int value) const
unsigned int operator[] (unsigned int n) const
void display (std::ostream &stream=std::cout)


Detailed Description

Represents a sorted sequence of numbers in the range [0, k)

Definition at line 19 of file IndexSet.h.


Constructor & Destructor Documentation

IndexSet::IndexSet ( unsigned int *  pBuf,
unsigned int  size 
) [inline]

The array of indexes passed to this constructor should have the same scope as the IndexSet object. Data is not copied.

Parameters:
pBuf an array of indexes
size count of indexes in pBuf

Definition at line 28 of file IndexSet.h.

IndexSet::IndexSet (  )  [inline]

Default constructor

Definition at line 34 of file IndexSet.h.


Member Function Documentation

void IndexSet::setData ( unsigned int *  pBuf,
unsigned int  size 
) [inline]

The array of indexes passed to this function should have the same scope as the IndexSet object. Data is not copied.

Parameters:
pBuf an array of indexes
size count of indexes in pBuf

Definition at line 47 of file IndexSet.h.

Referenced by Combinations::next(), and Combinations::start().

Here is the caller graph for this function:

unsigned int IndexSet::size (  )  const [inline]

Count the indexes in this set

Returns:
the count of indexes

Definition at line 56 of file IndexSet.h.

Referenced by Matrix< T, NumberTraits >::getMinor(), FiniteGroup< T, BinaryFunction >::getSubGroups(), and operator[]().

Here is the caller graph for this function:

bool IndexSet::find ( unsigned int  value  )  const [inline]

Determine if a given index is present in this set

Parameters:
value index to search for
Returns:
true if index is found, false otherwise

Definition at line 65 of file IndexSet.h.

Referenced by Matrix< T, NumberTraits >::getMinor().

Here is the caller graph for this function:

unsigned int IndexSet::operator[] ( unsigned int  n  )  const [inline]

Indexing operator

Parameters:
n index
Returns:
the index at index n

Definition at line 75 of file IndexSet.h.

References size().

Here is the call graph for this function:

void IndexSet::display ( std::ostream &  stream = std::cout  )  [inline]

Output the indexes to a stream

Parameters:
stream the stream to output the indexes

Definition at line 88 of file IndexSet.h.


The documentation for this class was generated from the following file:
Math-Objects Library Docs  Generated by: doxygen