ContentsIndexHome
PreviousUpNext
Dense data assignment

If the data to be assigned is spanning the whole index domain space, or a filter can be formulated for it, you can use the setValues method of the View to assign these values using a single call. Depending on the source of the data this might also be more convenient.

Compare the assignment of the transport costs in the basic example to this setValues call:

parameterUnitTransportCost.setValues(7.0, 12.0, 18.0, 14.0, 23.0, 17.0);
//or:
double [] values = {7.0, 12.0, 18.0, 14.0, 23.0, 17.0};
parameterUnitTransportCost.setValues(values);

If the dimension of the identifier at hand is higher-dimensional, the SDK expects the array offered to the setValues method to be in row major order. If your array is ordered in column major order (e.g. for Fortran), then you can call the setValuesCMO instead. The order of the elements of a each dimension follow the natural AIMMS ordering, see also the topic on ordinals

The array you offer to the dense setValues method should include the default values 0.0, which you typically do not transfer when using the sparse insert or setValue methods.