Developer Documentation
RAVL, Recognition And Vision Library
USER 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::IncrComb(DLIterC>)

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

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

SMALL OBJECT

Variables:
IntT combSize;
Number of items in combination.

IntT startLen;
Start length.

DListC> cIter;
List of combination iters.

DListC items;
List of all items.

DListC data;
Current combination.

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.

bool IncrComb(DLIterC<DLIterC<DataT>> lst)
Increment combination.


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