Skip to main content
FRAMES NO FRAMES

Class IloNumSet::Iterator

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

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

See Also:

Method Summary
public Iterator(const IloNumSet coll)
public IloBoolok() const
public IloIntoperator*()
public voidoperator++()
Method Detail

Iterator

public Iterator(const IloNumSet coll)

Create an iterator over the given set.


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(IloNumSet::Iterator iter(set); iter.ok(); ++iter){
         IloNum 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.