User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Sequences - CombinationIterC<class DataT>
 

  PUBLIC
CombinationIterC::CombinationIterC(IntT)
CombinationIterC::CombinationIterC(const DListC &,IntT)
CombinationIterC::CombinationIterC(const CombinationIterC &)
CombinationIterC::operator =(const DListC &)
CombinationIterC::IsElm(void) const
CombinationIterC::operator bool(void) const
CombinationIterC::Data(void)
CombinationIterC::Terms(void) const
CombinationIterC::First(void)
CombinationIterC::Next(void)
CombinationIterC::operator ++(int)

   CombinationIterC<class DataT>   
 
Combination iterator.
 
include "Ravl/CombinationIter.hh"
Created:24/08/98 
User Level:Normal
Library:RavlMath
In Scope:RavlN

Comments:
This iterator works from shorter to longer combinations progressively.

SMALL OBJECT

Variables:
Methods:
CombinationIterC(IntT nStartLen = 1)
Default constructor.

CombinationIterC(const DListC<DataT> & items,IntT nStartLen = 1)
Constructor.

CombinationIterC(const CombinationIterC<DataT> & oth)
Copy constructor.
This is a medium depth copy, it only copies enough to get an independant iteration of combination. The items list is NOT copied, so modifying it will affect the iterator.

const CombinationIterC<DataT> & operator =(const DListC<DataT> & items)
Assign to new list.
Does an implicit First().

bool IsElm() const
Is there a valid combination remaining ?

operator bool() const
Is there a valid combination remaining ?

DListC<DataT> & Data()
Current combination.

IntT Terms() const
Get number of items in current combination.

bool First()
Goto first combination.
Returns false if none.

bool Next()
Goto next combination.
Returns false if none.

void operator ++(int)
Goto next combination.


Maintainer:Charles Galambos, Created: 24/08/98, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002