omc::Combination Class Reference

List of all members.

Public Member Functions

 Combination (size_t)
 Combination (const std::string &)
size_t size () const
bool next ()
bool has (index_t) const
bool operator== (const Combination &) const
void add (index_t)

Protected Attributes

size_t m_numElements
unsigned long m_Bit

Friends

std::ostream & operator<< (std::ostream &, const Combination &)

Constructor & Destructor Documentation

omc::Combination::Combination ( size_t  n  )  [inline]

Constructor: empty combination.

omc::Combination::Combination ( const std::string &  s  )  [inline]

Constructor: from a "string-represented combination", e.g. "100" means chooseing element 0 from a set of 3 elements.


Member Function Documentation

void omc::Combination::add ( index_t  i  )  [inline]

Add element i into the combination.

bool omc::Combination::has ( index_t  i  )  const [inline]

Test if element i is in the current combination.

bool omc::Combination::next (  )  [inline]

Generate the next lexicographically greater permutation.

bool omc::Combination::operator== ( const Combination comb  )  const [inline]

Operator ==.

size_t omc::Combination::size (  )  const [inline]

Create a set representing the current combination. Get the number of elements.


The documentation for this class was generated from the following file:
 All Classes Functions

Generated on Fri Feb 12 16:10:23 2010 by  doxygen 1.6.1