Skip to main content
FRAMES NO FRAMES

Class IlcIntervalSequenceVar::Iterator

Definition file: ilcp/cpext.h
Map of IlcIntervalSequenceVar::IteratorIlcIntervalSequenceVar::IteratorIlcIntervalSequenceVar::Iterator
The class of iterator for the Head-Tail graph of a sequence.

This class provides a mechanism for iterating on the domain of the Head-Tail graph of a sequence. The iterator iterates on subsets of intervals, instances of IlcIntervalVar, from an instance of IlcIntervalSequenceVar. The subset is given by a filter from the enumeration IlcIntervalSequenceVar::Filter:

If given, a position, an instance of IlcIntervalVar that must belong to the correct subset, is initially pointed at by the iterator

An iterator on the Head-Tail graph of a sequence is not stable in the case of a change of the graph.

See Also:

Method Summary
public Iterator(const IlcIntervalSequenceVar sequence, IlcIntervalSequenceVar::Filter filter, const IlcIntervalVar position=0)
public IlcBoolok() const
public IlcIntervalVaroperator*() const
public Iterator &operator++()
public Iterator &operator--()
Method Detail

Iterator

public Iterator(const IlcIntervalSequenceVar sequence, IlcIntervalSequenceVar::Filter filter, const IlcIntervalVar position=0)

This constructor creates an iterator to iterate over some subset of the argument sequence, an instance of IlcIntervalSequenceVar. The subset is given by the argument filter, from the enumeration IlcIntervalSequenceVar::Filter. If given, a position, an instance of IlcIntervalVar belonging to the correct subset, initializes the iterator.


ok

public IlcBool ok() const

This member function indicates whether all intervals have been traversed by returning IloTrue; otherwise it returns IloFalse.


operator*

public IlcIntervalVar operator*() const

This operator returns the current interval, an instance of IlcIntervalVar, to which the invoking iterator points.


operator++

public Iterator & operator++()

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


operator--

public Iterator & operator--()

This operator retreats the iterator to point to the previous value in the domain of the interval sequence variable. A reference to the invoking iterator is returned.