Overview | Group | Tree | Graph | Index | Concepts |
An instance of the class IlcAnyVarDeltaIterator
is an
iterator that traverses the values belonging to the domain-delta of a
constrained enumerated variable (that is, an instance of IlcAnyVar
).
For more information, see the concepts Propagation, Iterator, and Domain-Delta.
See Also:
Constructor and Destructor Summary | |
---|---|
public | IlcAnyVarDeltaIterator(const IlcAnyVar var) |
Method Summary | |
---|---|
public IlcBool | ok() const |
public IlcAny | operator*() const |
public IlcAnyVarDeltaIterator & | operator++() |
Inherited Methods from IlcIntVarDeltaIterator |
---|
ok, operator*, operator++ |
Constructor and Destructor Detail |
---|
This constructor creates an iterator associated with var
to traverse the values belonging to the domain-delta of var
.
Method Detail |
---|
This member function returns IlcTrue
if there is a
current element and the invoking iterator points to it. Otherwise,
it returns IlcFalse
.
To traverse the values belonging to the domain-delta of a constrained enumerated variable, use the following code:
IlcAny val; for(IlcAnyVarDeltaIterator iter(set); iter.ok(); ++iter){ val = *iter; // do something with val }
This operator returns the current element, the one to which the invoking iterator points.
This operator advances the iterator to point to the next value in the domain-delta of the constrained enumerated variable.