Skip to main content
FRAMES NO FRAMES

Class IloTupleMap

Definition file: ilopl/ilotuplemap.h
Map of IloTupleMapIloTupleMapIloTupleMap
This class represents a convenient way to map tuple values.

This class represents a convenient way to map tuple values.

Method Summary
public voidend()
public voidendElements()
public voidgetAt(IloMapIndexArray indices, IloTupleBuffer buffer) const
public voidgetAt(IloMapIndexArray indices, IloTuple tuple) const
public IloEnvgetEnv() const
public IloIntgetNbDim() const
public IloIntgetNonEmptySlotSize() const
public IloTupleSchemagetSchema() const
public IloIntgetSize() const
public IloIntgetTotalSize() const
public IloMapIndexermakeMapIndexer() const
public IloTuplemakeTuple() const
public IloTupleBuffermakeTupleBuffer() const
public voidsetAt(IloMapIndexArray indices, IloTupleBuffer value)
public voidsetAt(IloMapIndexArray indices, IloTuple value)
Method Detail

end

public void end()

This method ends the invoking map.


endElements

public void endElements()

This method ends the invoking map along with all of its elements.


getAt

public void getAt(IloMapIndexArray indices, IloTupleBuffer buffer) const

Returns the value of the element. pointed to by indices from the map. It fills the given tuple

Example with a Map: M[i in 1..5][j in 1..2] = <j> M.getAt( [1][2], t ) will fill t with M[1][2] that is <2>.

Parameters:

indices
The path to access the element.

getAt

public void getAt(IloMapIndexArray indices, IloTuple tuple) const

Returns the value of the element. pointed to by indices from the map. It fills the given tuple

Example with a Map: M[i in 1..5][j in 1..2] = <j> M.getAt( [1][2], t ) will fill t with M[1][2] that is <2>.

Parameters:

indices
The path to access the element.

getEnv

public IloEnv getEnv() const

This member function returns the environment in which the invoking array was created. The elements of the invoking array belong to the same environment.

Returns:

The environment in which the invoking array was created.

getNbDim

public IloInt getNbDim() const

Returns the dimension of the map i.e the number of indexers.

Example with a Map: M[1..5][1..2]M.getNbDim( ) returns 2.


getNonEmptySlotSize

public IloInt getNonEmptySlotSize() const

.


getSchema

public IloTupleSchema getSchema() const

Returns the schema of the tuples that are in the map.

Returns:

The schema of the tuples in the current map.

getSize

public IloInt getSize() const

This member function returns an integer specifying the size of the invoking array. An empty array has size 0 (zero).

Example with a Map: M[1..5][1..2]M.getSize( ) returns 5. M.getSub( 1 ).getSize( ) returns 2.


getTotalSize

public IloInt getTotalSize() const

Returns the total number of values that are in this array.

Example with a Map: M[1..5][1..2]M.getTotalSize( ) returns 10. M.getSub(1).getTotalSize( ) returns 2.


makeMapIndexer

public IloMapIndexer makeMapIndexer() const

Retrieves the indices of an array of tuples.


makeTuple

public IloTuple makeTuple() const

Creates an empty tuple suitable to be filled by getAt.


makeTupleBuffer

public IloTupleBuffer makeTupleBuffer() const

Creates an empty tuple buffer suitable to be filled by getAt.


setAt

public void setAt(IloMapIndexArray indices, IloTupleBuffer value)

This member function sets the element pointed to by indices from the map to value.

Example with a Map: M[i in 1..5][j in 1..2] = <j> M.setAt( [1][2], <t> ) will fill M[1][2] with t.

Parameters:

indices
The map element to be set.
value
The new value of the map element.

setAt

public void setAt(IloMapIndexArray indices, IloTuple value)

This member function sets the element pointed to by indices from the map to value.

Example with a Map: M[i in 1..5][j in 1..2] = <j> M.setAt( [1][2], t ) will fill M[1][2] with the values from t.

Parameters:

indices
The map element to be set.
value
The new value of the map element.