Overview | Group | Tree | Graph | Index | Concepts |
Iterator
is a class nested in the class
IloSolution
. It allows you to traverse the variables
in a solution. The iterator scans the objects in the same order as they were added to
the solution.
This iterator is not robust. If the variable at the current position is deleted from the solution being iterated over, the behavior of this iterator afterwards is undefined.
iter
can be safely used after the following code has executed:IloExtractable elem = *iter; ++iter; solution.remove(elem);
iter
cannot be safely used after the following code has executed:solution.remove(*iter); // bad idea ++iter;
See Also:
Method Summary | |
---|---|
public IloBool | ok() |
public IloExtractable | operator *() |
public Iterator & | operator++() |
Method Detail |
---|
This member function returns IloTrue
if the current position of the
iterator is a valid one. It returns IloFalse
if all variables have been
scanned by the iterator.
This operator returns the extractable object corresponding to the variable located at the current iterator position. If all variables have been scanned, this operator returns an empty handle.
This operator moves the iterator to the next variable in the solution.