ContentsIndexHome
PreviousUpNext
IIterator Class

Reads multi dimensional data in a sequential order. 

Iterators can be created using createIterator on an IMultiDimData or IDataView. If created on the data itself , an IFilter may be specified. 

 

C++
class IIterator;

When data changes of the corresponding identifier are send to AIMMS, an open IIterator is invalidated. Iterating is then only possible after reset is called. This includes data changes outside the slice for which the IIterator is created, in case of a restricted iterator. 

More information on when data changes are send to AIMMS can be found in the topic on Optimizing performance.

Name 
Description 
The following tables list the members exposed by IIterator. 
Public Methods
 
Name 
Description 
 
Verifies whether the given ITuple can be used with the getTuple method. More specifically, it tests whether the given ITuple is compatible with the domain sets of the associated IData object.
 
 
Returns the value on the current position. Applies to string valued data and element valued data of which the range is not a subset of Integers.
 
 
Returns the value on the current position. Applies to double valued data only.
 
 
Returns the value on the current position. Applies to element valued data only.
 
 
Returns the value on the current position. Applies to integer valued data and element valued data of which the range is a subset of Integers.
 
 
Retrieves the current position into an ITuple, which you must create first by invoking the createTuple method.
 
 
Returns the value on the current position. Applies to string valued data and element valued data of which the range is not a subset of Integers.
 
 
Closes the iterator and invalidates this object.
 
 
Creates an IElement that can be used to retrieve the value at the current position, by using it as an argument of the getValue method.
 
 
Creates an ITuple that can be used to retrieve the current position, by using it as an argument of the getTuple method.
 
 
Returns the dimension of the IIterator.
 
 
Retrieves the value on the current position. 
 
next 
Moves the current position to the next non-default value, if any.
 
 
Re initializes the iterator: Moves the current position to before the beginning of the data; a subsequent next call will find the first non-default position. If the iterator was in an erroneous state, the reset method will also reset the state to normal.
 
 
Returns the current position of the iterator. The returned ITuple is readonly.
 
Public Operators
 
Name 
Description 
 
[] 
Returns the position on the specified dimension.