Skip to main content
FRAMES NO FRAMES

Class IloTuple

Definition file: ilopl/ilotuple.h
Map of IloTupleIloTupleIloTupleBufferIloTuple
This class creates a tuple as a line of a tuple set.

This class represents a tuple object that clusters together closely related data.

The data are organized in sets of tuples or arrays of tuples

You should not create IloTuple objects directly, but instead create them using the method IloTupleSet::makeTuple or the class IloTupleIterator.

See Also:

Method Summary
public voiddisplay(ostream & outs) const
public voidend()
public IloAnyCollectiongetAnyCollectionValue(const char * col) const
public IloAnyCollectiongetAnyCollectionValue(IloIntArray path) const
public IloAnyCollectiongetAnyCollectionValue(IloInt index) const
public IloAnygetAnyValue(IloIntArray path) const
public IloTupleCollectiongetCollection() const
public IloEnvgetEnv() const
public IloIntgetIndex() const
public IloIntCollectiongetIntCollectionValue(const char * col) const
public IloIntCollectiongetIntCollectionValue(IloIntArray path) const
public IloIntCollectiongetIntCollectionValue(IloInt index) const
public IloIntMapgetIntMapValue(const char * col) const
public IloIntMapgetIntMapValue(IloIntArray path) const
public IloIntMapgetIntMapValue(IloInt index) const
public IloIntSetgetIntSetValue(const char * col) const
public IloIntSetgetIntSetValue(IloIntArray path) const
public IloIntSetgetIntSetValue(IloInt index) const
public IloIntgetIntValue(const char * col) const
public IloIntgetIntValue(IloIntArray path) const
public IloIntgetIntValue(IloInt index) const
public IloNumCollectiongetNumCollectionValue(const char * col) const
public IloNumCollectiongetNumCollectionValue(IloIntArray path) const
public IloNumCollectiongetNumCollectionValue(IloInt index) const
public IloNumMapgetNumMapValue(const char * col) const
public IloNumMapgetNumMapValue(IloIntArray path) const
public IloNumMapgetNumMapValue(IloInt index) const
public IloNumSetgetNumSetValue(const char * col) const
public IloNumSetgetNumSetValue(IloIntArray path) const
public IloNumSetgetNumSetValue(IloInt index) const
public IloNumgetNumValue(const char * col) const
public IloNumgetNumValue(IloIntArray path) const
public IloNumgetNumValue(IloInt index) const
public IloTupleSchemagetSchema() const
public const char *getStringValue(const char * col) const
public const char *getStringValue(IloIntArray path) const
public const char *getStringValue(IloInt index) const
public IloSymbolSetgetSymbolSetValue(const char * col) const
public IloSymbolSetgetSymbolSetValue(IloIntArray path) const
public IloSymbolSetgetSymbolSetValue(IloInt index) const
public IloSymbolgetSymbolValue(const char * col) const
public IloSymbolgetSymbolValue(IloIntArray path) const
public IloSymbolgetSymbolValue(IloInt index) const
public IloTupleBuffermakeTupleBuffer() const
public IloTuplemakeTupleValue(const char * col) const
public IloTuplemakeTupleValue(IloIntArray path) const
public IloTuplemakeTupleValue(IloInt index) const
public voidsetCollection(IloTupleCollection coll)
public voidsetIndex(IloInt i)
Method Detail

display

public void display(ostream & outs) const

Displays the created tuple.


end

public void end()

This member function deletes the invoking object. That is, it frees all the resources used by the invoking object. After a call to this member function, you cannot use the invoking extractable object again.


getAnyCollectionValue

public IloAnyCollection getAnyCollectionValue(const char * col) const

Returns the IloAnyCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloAnyCollection representing the value of the column.

getAnyCollectionValue

public IloAnyCollection getAnyCollectionValue(IloIntArray path) const

Returns the IloAnyCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloAnyCollection representing the value of the column.

getAnyCollectionValue

public IloAnyCollection getAnyCollectionValue(IloInt index) const

Returns the IloAnyCollecton value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloAnyCollection representing the value of the column.

getAnyValue

public IloAny getAnyValue(IloIntArray path) const

Returns the IloAny value of the given column of the invoking tuple. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloAny representing the value of the column.

getCollection

public IloTupleCollection getCollection() const

Returns the collection that the index is pointing to.

Returns:

An IloTupleCollection representing the collection.

getEnv

public IloEnv getEnv() const

This member function returns the environment in which the invoking tuple was created.

Returns:

The environment in which the invoking tuple was created.

getIndex

public IloInt getIndex() const

Returns the position of the invoking tuple in its tuple set.

Returns:

An integer representing the position of the invoking tuple.

getIntCollectionValue

public IloIntCollection getIntCollectionValue(const char * col) const

Returns the IloIntCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloIntCollection representing the value of the column.

getIntCollectionValue

public IloIntCollection getIntCollectionValue(IloIntArray path) const

Returns the IloIntCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloIntCollection representing the value of the column.

getIntCollectionValue

public IloIntCollection getIntCollectionValue(IloInt index) const

Returns the IloIntCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

The tuple set remains the owner of the collection.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloIntCollection representing the value of the column.

getIntMapValue

public IloIntMap getIntMapValue(const char * col) const

Returns the IloIntMap value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloIntMap representing the value of the column.

getIntMapValue

public IloIntMap getIntMapValue(IloIntArray path) const

Returns the IloIntMap value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloIntMap representing the value of the column.

getIntMapValue

public IloIntMap getIntMapValue(IloInt index) const

Returns the IloIntMap value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloIntMap representing the value of the column.

getIntSetValue

public IloIntSet getIntSetValue(const char * col) const

Returns the IloIntSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloIntSet representing the value of the column.

getIntSetValue

public IloIntSet getIntSetValue(IloIntArray path) const

Returns the IloIntSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloIntSet representing the value of the column.

getIntSetValue

public IloIntSet getIntSetValue(IloInt index) const

Returns the IloIntSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloIntSet representing the value of the column.

getIntValue

public IloInt getIntValue(const char * col) const

Returns the value of the given column of the invoking tuple as an integer. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An integer representing the value of the column.

getIntValue

public IloInt getIntValue(IloIntArray path) const

Returns the IloInt value of the given column of the invoking tuple. Produces an error if the column type is not compatible.

For a tuple having this schema:

 < a: int, b: int, c: S1, d: int >
 

where S1 is

 < e: symbol, f: S2, g: symbol >
 

and S2 is

 <  h: int, i: float >
 

getIntValue( [2,2] ) implies return the value of g and getIntValue( [2,1,0] ) implies return the value of h.

Parameters:

path
The column of the invoking tuple.

Returns:

An integer representing the value of the column.

getIntValue

public IloInt getIntValue(IloInt index) const

Returns the integer value of the given column of the invoking tuple and produces an execution error if the column type is not IloInt.

Parameters:

index
The column of the invoking tuple.

Returns:

An int representing the value of the given column.

getNumCollectionValue

public IloNumCollection getNumCollectionValue(const char * col) const

Returns the IloNumCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloNumCollection representing the value of the column.

getNumCollectionValue

public IloNumCollection getNumCollectionValue(IloIntArray path) const

Returns the IloNumCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloNumCollection representing the value of the column.

getNumCollectionValue

public IloNumCollection getNumCollectionValue(IloInt index) const

Returns the IloNumCollection value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloNumCollection representing the value of the column.

getNumMapValue

public IloNumMap getNumMapValue(const char * col) const

Returns the IloNumMap value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloNumMap representing the value of the column.

getNumMapValue

public IloNumMap getNumMapValue(IloIntArray path) const

Returns the IloNumMap value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloNumMap representing the value of the column.

getNumMapValue

public IloNumMap getNumMapValue(IloInt index) const

Returns the IloNumMap value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloNumMap representing the value of the column.

getNumSetValue

public IloNumSet getNumSetValue(const char * col) const

Returns the IloNumSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloNumSet representing the value of the column.

getNumSetValue

public IloNumSet getNumSetValue(IloIntArray path) const

Returns the IloNumSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloNumSet representing the value of the column.

getNumSetValue

public IloNumSet getNumSetValue(IloInt index) const

Returns the IloNumSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloNumSet representing the value of the column.

getNumValue

public IloNum getNumValue(const char * col) const

Returns the value of the given column of the invoking tuple as floating-point number. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

A float representing the value of the column.

getNumValue

public IloNum getNumValue(IloIntArray path) const

Returns the IloNum value of the given column of the invoking tuple. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

A float representing the value of the column.

getNumValue

public IloNum getNumValue(IloInt index) const

Returns the IloNum value of the given column of the invoking tuple and produces an execution error if the column type is not IloNum.

Parameters:

index
The column of the invoking tuple.

Returns:

A float representing the value of the given column.

getSchema

public IloTupleSchema getSchema() const

Returns the schema of the created tuple.

Returns:

An IloTupleSchema containing the schema of the new tuple.

getStringValue

public const char * getStringValue(const char * col) const

Returns the value of the given column of the invoking tuple as a string. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

A char representing the value of the column.

getStringValue

public const char * getStringValue(IloIntArray path) const

Returns the value of the given column of the invoking tuple as a string. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

A char representing the value of the column.

getStringValue

public const char * getStringValue(IloInt index) const

Returns the value of the given column of the invoking tuple as a string. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

A char representing the value of the column.

getSymbolSetValue

public IloSymbolSet getSymbolSetValue(const char * col) const

Returns the IloSymbolSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloSymbolSet representing the value of the column.

getSymbolSetValue

public IloSymbolSet getSymbolSetValue(IloIntArray path) const

Returns the IloSymbolSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloSymbolSet representing the value of the column.

getSymbolSetValue

public IloSymbolSet getSymbolSetValue(IloInt index) const

Returns the IloSymbolSet value of the given column of the invoking tuple. The IloTupleSet remains the owner of the collection. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloSymbolSet representing the value of the column.

getSymbolValue

public IloSymbol getSymbolValue(const char * col) const

Returns the IloSymbol value of the given column of the invoking tuple. Produces an error if the column type is not compatible.

Parameters:

col
The column name of the invoking tuple.

Returns:

An IloSymbol representing the value of the column.

getSymbolValue

public IloSymbol getSymbolValue(IloIntArray path) const

Returns the IloSymbol value of the given column of the invoking tuple. Produces an error if the column type is not compatible.

See Also:

Parameters:

path
The column of the invoking tuple.

Returns:

An IloSymbol representing the value of the column.

getSymbolValue

public IloSymbol getSymbolValue(IloInt index) const

Returns the IloSymbol value of the given column of the invoking tuple. Produces an error if the column type is not compatible.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloSymbol representing the value of the column.

makeTupleBuffer

public IloTupleBuffer makeTupleBuffer() const

Returns a buffer to commit on the IloTupleSet

To populate a set of tuple, you have to commit tuples by values.

See Also:

Returns:

The IloTupleBuffer to be committed.

makeTupleValue

public IloTuple makeTupleValue(const char * col) const

Creates and returns the IloTuple value of the given column of the invoking tuple.

Parameters:

col
The column of the invoking tuple.

Returns:

An IloTuple representing the value of the column.

makeTupleValue

public IloTuple makeTupleValue(IloIntArray path) const

Creates and returns the IloTuple value of the given column of the invoking tuple.

Parameters:

path
The column of the invoking tuple.

Returns:

An IloTuple representing the value of the column.

makeTupleValue

public IloTuple makeTupleValue(IloInt index) const

Creates and returns the IloTuple value of the given column of the invoking tuple.

Parameters:

index
The column of the invoking tuple.

Returns:

An IloSymbol representing the value of the column.

setCollection

public void setCollection(IloTupleCollection coll)

sets the collection


setIndex

public void setIndex(IloInt i)

Sets the index that points to the collection.

Parameters:

i
The index of the collection.