NO FRAMES

Class IloAnyTupleSetIterator

Definition file: ilconcert/ilotupleset.h
An iterator to traverse the elements of a finite set of tuples of enumerated values.

An instance of the class IloAnyTupleSetIterator is an iterator that traverses the elements of a finite set of tuples of enumerated values (instance of IloAnyTupleSet).

See Also:

Constructor Summary
public IloAnyTupleSetIterator(const IloEnv, IloAnyTupleSet)
Method Summary
public IloBoolok()
public IloAnyArrayoperator *()
public voidoperator++()
Constructor Detail

IloAnyTupleSetIterator

public IloAnyTupleSetIterator(const IloEnv env, IloAnyTupleSet tSet)

This constructor creates an iterator associated with tSet to traverse its elements.


Method Detail

ok

public IloBool ok()

This member function returns IloTrue if there is a current element and invoking iterator points to it. Otherwise, it returns IloFalse.

To traverse the elements of a finite set of tuples, use the following code:


 IloAnyTupleSet val;

 for(IloAnyTupleSetIterator iter(env, tset); iter.ok(); ++iter){

         val = *iter;

         // do something with val

 }

operator *

public IloAnyArray operator *()

This operator returns the current element, the one to which the invoking iterator points.


operator++

public void operator++()

This operator advances the iterator to point to the next tuple in the set.