ContentsIndexHome
PreviousUpNext
Tuple Class

Object that allows to conveniently represent an AIMMS tuple. Use the ITuple inerface instead when performance is an issue, or when the convenience Tuple, which has a maximum of 5 dimensions, is not enough. 

Convenience tuples can be created using the constructors, which allow up to 5 labels as argument. 

 

The Tuple class was added to the SDK as an alternative for the ITuple interface. The Tuple class makes it easy to work with labels (both string and integer) on IMultiDimData and IDataView, as can be seen in the example below.

C++
// Set the value using the Tuple class...
data->setValue(Tuple("London", "Paris"), 23.7);

// ... doing the same using the ITuple class
ITuple* tup = data->createTuple();
tup[0].setLabel("London");
tup[1].setLabel("Paris");
data->setValue(tup, 23.7);

The dimension of Tuple is limited to 5. Although higher dimensional data is possible in AIMMS, we do not want to encourage you to use the Tuple class in that cases because of the performance penalties and readability. The ITuple interface can handle all dimensions.

Name 
Description 
The following tables list the members exposed by Tuple. 
Public Constructors
 
Name 
Description 
 
Construct the Tuple with zero to five TupleArgs.