Skip to main content
FRAMES NO FRAMES

Class IloCP::IntVarIterator

Definition file: ilcp/cp.h
Include file: <ilcp/cp.h>
Map of IloCP::IntVarIteratorIloCP::IntVarIteratorIloCP::IntVarIterator
The class for iterating over the current domain of an integer variable.

This class is used to iterate over the current domain of an integer variable.

For more information, see the concept Iterator.

See Also:

Method Summary
public IntVarIterator(IloCP cp, IloIntVar var)
public IloBoolok() const
public IloIntoperator*() const
public IntVarIterator &operator++()
Method Detail

IntVarIterator

public IntVarIterator(IloCP cp, IloIntVar var)

This constructor creates an iterator which will iterate over the current domain of var as maintained by cp.


ok

public IloBool ok() const

This member function indicates if all domain elements have been traversed by returning IloTrue; otherwise it returns IloFalse.


operator*

public IloInt operator*() const

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


operator++

public IntVarIterator & operator++()

This operator advances the iterator to point to the next value in the domain of the constrained integer variable. A reference to the invoking iterator is returned.