NO FRAMES

Class IloIntSet::Iterator

Definition file: ilconcert/iloset.h
This class is an iterator that traverses the elements of a finite set of numeric values.

An instance of the nested class IloIntSet::Iterator is an iterator that traverses the elements of a finite set of numeric values (an instance of IloIntSet).

See Also:

Constructor and Destructor Summary
public Iterator(const IloIntSet coll)
Method Summary
public IloBoolok() const
public IloIntoperator *()
public voidoperator++()
Constructor and Destructor Detail

Iterator

public Iterator(const IloIntSet coll)

Creates an iterator over the given set.


Method Detail

ok

public IloBool ok() const

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

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

 for(IloIntSet::Iterator iter(set); iter.ok(); ++iter){
         IloInt val = *iter;
         // do something with val
 }

operator *

public IloInt operator *()

This operator returns the current value.


operator++

public void operator++()

This operator advances the iterator to point to the next value in the dataset.