跳至主内容
框架 无框架

类IloTuple

定义文件: ilopl/ilotuple.h
IloTuple的地图IloTupleIloTupleBufferIloTuple
该类将元组创建为元组集合的一行。

该类代表一个 "tuple对象,将密切相关的数据集中在一起。

数据以元组集或元组数组的形式组织

您不应直接创建 "IloTuple对象,而应使用IloTupleSet::makeTuple方法或IloTupleIterator 类来创建它们。

另请参阅:

方法概要
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)
方法详细信息

显示

public voiddisplay(ostream &outs) const

显示创建的元组。


结束

public voidend()

该成员函数用于删除调用对象。 也就是说,它会释放调用对象使用的所有资源。 调用该成员函数后,不能再使用调用的可提取对象。


getAnyCollectionValue

publicIloAnyCollection getAnyCollectionValue(const char *col) const

返回调用元组中给定列的IloAnyCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloAnyCollection

getAnyCollectionValue

publicIloAnyCollection getAnyCollectionValue(IloIntArray path) const

返回调用元组中给定列的IloAnyCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloAnyCollection

getAnyCollectionValue

publicIloAnyCollection getAnyCollectionValue(IloInt index) const

返回调用元组中给定列的IloAnyCollecton值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloAnyCollection

getAnyValue

publicIloAny getAnyValue(IloIntArray path) const

返回调用元组中给定列的IloAny值。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloAny

getCollection

公共IloTupleCollection getCollection() 常量

返回索引指向的集合。

返回:

代表集合的 "IloTupleCollection

getEnv

publicIloEnv getEnv() const

该成员函数返回创建调用元组的环境。

返回:

创建调用元组的环境。

getIndex

publicIloInt getIndex() const

返回调用元组在其元组集中的位置。

返回:

一个整数,代表调用元组的位置。

getIntCollectionValue

publicIloIntCollection getIntCollectionValue(const char *col) const

返回调用元组中给定列的IloIntCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloIntCollection

getIntCollectionValue

publicIloIntCollection getIntCollectionValue(IloIntArray path) const

返回调用元组中给定列的IloIntCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloIntCollection

getIntCollectionValue

publicIloIntCollection getIntCollectionValue(IloInt index) const

返回调用元组中给定列的IloIntCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

元组集仍然是集合的所有者。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloIntCollection

getIntMapValue

publicIloIntMap getIntMapValue(const char *col) const

返回调用元组中给定列的IloIntMap值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloIntMap

getIntMapValue

publicIloIntMap getIntMapValue(IloIntArray path) const

返回调用元组中给定列的IloIntMap值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloIntMap

getIntMapValue

publicIloIntMap getIntMapValue(IloInt index) const

返回调用元组中给定列的IloIntMap值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloIntMap

getIntSetValue

publicIloIntSet getIntSetValue(const char *col) const

返回调用元组中给定列的IloIntSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloIntSet

getIntSetValue

publicIloIntSet getIntSetValue(IloIntArray path) const

返回调用元组中给定列的IloIntSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloIntSet

getIntSetValue

publicIloIntSet getIntSetValue(IloInt index) const

返回调用元组中给定列的IloIntSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloIntSet

getIntValue

publicIloInt getIntValue(const char *col) const

以整数形式返回调用元组中给定列的值。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的整数。

getIntValue

publicIloInt getIntValue(IloIntArray path) const

返回调用元组中给定列的IloInt值。 如果列类型不兼容,则会产生错误。

对于具有这种模式的元组来说:

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

其中S1为

 < e:符号,f:S2,g:符号 >
 

而S2为

 < h: int, i: float >
 

getIntValue( [2,2] )表示返回 g 的值,"getIntValue( [2,1,0] )表示返回 h 的值。

参数:

路径
调用元组的列。

返回:

代表列值的整数。

getIntValue

publicIloInt getIntValue(IloInt index) const

返回调用元组中给定列的整数值,如果列类型不是IloInt,则会产生执行错误。

参数:

索引
调用元组的列。

返回:

一个 int,代表给定列的值。

getNumCollectionValue

publicIloNumCollection getNumCollectionValue(const char *col) const

返回调用元组中给定列的IloNumCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloNumCollection

getNumCollectionValue

publicIloNumCollection getNumCollectionValue(IloIntArray path) const

返回调用元组中给定列的IloNumCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloNumCollection

getNumCollectionValue

publicIloNumCollection getNumCollectionValue(IloInt index) const

返回调用元组中给定列的IloNumCollection值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloNumCollection

getNumMapValue

publicIloNumMap getNumMapValue(const char *col) const

返回调用元组中给定列的IloNumMap值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloNumMap

getNumMapValue

publicIloNumMap getNumMapValue(IloIntArray path) const

返回调用元组中给定列的IloNumMap值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloNumMap

getNumMapValue

publicIloNumMap getNumMapValue(IloInt index) const

返回调用元组中给定列的IloNumMap值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloNumMap

getNumSetValue

publicIloNumSet getNumSetValue(const char *col) const

返回调用元组中给定列的IloNumSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloNumSet

getNumSetValue

publicIloNumSet getNumSetValue(IloIntArray path) const

返回调用元组中给定列的IloNumSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloNumSet

getNumSetValue

publicIloNumSet getNumSetValue(IloInt index) const

返回调用元组中给定列的IloNumSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloNumSet

getNumValue

publicIloNum getNumValue(const char *col) const

以浮点数形式返回调用元组中给定列的值。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的浮点数。

getNumValue

publicIloNum getNumValue(IloIntArray path) const

返回调用元组中给定列的IloNum值。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的浮点数。

getNumValue

publicIloNum getNumValue(IloInt index) const

返回调用元组中给定列的IloNum值,如果列类型不是IloNum,则会产生执行错误。

参数:

索引
调用元组的列。

返回:

代表给定列值的浮点数。

getSchema

publicIloTupleSchema getSchema() const

返回已创建元组的模式。

返回:

包含新元组模式的 "IloTupleSchema

getStringValue

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

以字符串形式返回调用元组中给定列的值。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

表示列值的字符。

getStringValue

public const char *getStringValue(IloIntArray path) const

以字符串形式返回调用元组中给定列的值。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

表示列值的字符。

getStringValue

public const char *getStringValue(IloInt index) const

以字符串形式返回调用元组中给定列的值。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "char

getSymbolSetValue

public 'IloSymbolSet'获取符号集值(const char * 'Col) const

返回调用元组中给定列的IloSymbolSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloSymbolSet

getSymbolSetValue

public 'IloSymbolSet'获取符号集值(IloIntArray') const

返回调用元组中给定列的IloSymbolSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloSymbolSet

getSymbolSetValue

public 'IloSymbolSet'获取符号集值(IloInt'索引) const

返回调用元组中给定列的IloSymbolSet值。 IloTupleSet仍然是集合的所有者。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloSymbolSet

getSymbolValue

publicIloSymbol getSymbolValue(const char *col) const

返回调用元组中给定列的IloSymbol值。 如果列类型不兼容,则会产生错误。

参数:

Col
调用元组的列名。

返回:

代表列值的 "IloSymbol

getSymbolValue

publicIloSymbol getSymbolValue(IloIntArray path) const

返回调用元组中给定列的IloSymbol值。 如果列类型不兼容,则会产生错误。

另请参阅:

参数:

路径
调用元组的列。

返回:

代表列值的 "IloSymbol

getSymbolValue

publicIloSymbol getSymbolValue(IloInt index) const

返回调用元组中给定列的IloSymbol值。 如果列类型不兼容,则会产生错误。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloSymbol

makeTupleBuffer

publicIloTupleBuffer makeTupleBuffer() const

返回要在 "IloTupleSet上提交的缓冲区

要填充元组集,必须按值提交元组。

另请参阅:

返回:

要提交的 "IloTupleBuffer

makeTupleValue

publicIloTuple makeTupleValue(const char *col) const

创建并返回调用元组中给定列的IloTuple值。

参数:

Col
调用元组的列。

返回:

代表列值的 "IloTuple

makeTupleValue

publicIloTuple makeTupleValue(IloIntArray path) const

创建并返回调用元组中给定列的 "IloTuple值。

参数:

路径
调用元组的列。

返回:

代表列值的 "IloTuple

makeTupleValue

publicIloTuple makeTupleValue(IloInt index) const

创建并返回调用元组中给定列的 "IloTuple值。

参数:

索引
调用元组的列。

返回:

代表列值的 "IloSymbol

setCollection

public void '设置收藏(IloTupleCollection'相撞)

设置集合


setIndex

public void '设置索引(IloInt'i)

设置指向集合的索引。

参数:

i
集合的索引。