| 概述 | 组 | 树 | 图形 | 不推荐 | 索引 | 概念 |

IlcIntVar的数组类。类 "IlcIntVarArray是 "IlcIntVar实例数组的类。 该类的实例是从 0 开始索引的数组。
另请参阅:
| 方法概要 | |
|---|---|
public IlcIntVarArray | getCopy() const |
public IlcIntVarArrayI * | getImpl() const |
public IlcInt | getMaxMax() const |
public IlcInt | getMaxMax(IlcInt indexMin, IlcInt indexMax) const |
public IlcInt | getMaxMin() const |
public IlcInt | getMaxMin(IlcInt indexMin, IlcInt indexMax) const |
public IlcInt | getMinMax() const |
public IlcInt | getMinMax(IlcInt indexMin, IlcInt indexMax) const |
public IlcInt | getMinMin() const |
public IlcInt | getMinMin(IlcInt indexMin, IlcInt indexMax) const |
public IlcInt | getSize() const |
public | IlcIntVarArray(IlcIntVarArrayI * impl=0) |
public | IlcIntVarArray(IlcCPEngine solver, IlcInt size) |
public | IlcIntVarArray(IlcCPEngine solver, IlcInt size, const IlcIntVar exp...) |
public | IlcIntVarArray(IlcCPEngine solver, IlcInt size, IlcInt min, IlcInt max) |
public IlcIntExp | operator[](const IlcIntExp exp) const |
public IlcIntVar & | operator[](IlcInt index) const |
| 方法详细信息 |
|---|
该构造函数通过指向实现对象的指针创建一个句柄对象。 如果实现对象为零,则必须在使用前初始化句柄。
该构造函数创建了一个长度为 "size的未初始化数组。 参数 "size必须严格大于 0(零)。 数组的索引范围是 "[0 size)。 在使用数组之前,必须先分配数组中的每个元素。
该构造函数创建了一个集合数组;数组的长度为 "size;数组元素用 "IlcIntVar类型的参数初始化。 IlcIntVar类型的参数个数必须与 "size相同。
此构造函数创建一个 "size约束整数变量数组。 参数 "size必须严格大于 0(零)。 每个受限整数变量都有一个域,该域包含 "min和 "max之间的所有整数值。
该成员函数返回调用的约束变量数组的副本,并将该副本与构造时传递的 CP 优化器对象关联。
该成员函数返回一个指向调用句柄的实现对象的指针。
该成员函数返回属于调用约束整数变量数组的变量最大值中的最大值。
该成员函数返回属于调用约束整数变量数组的变量最大值中的最大值。 如果提供参数 "indexMin和 "indexMax,则只考虑与 "[indexMin indexMax)范围内的索引相对应的变量。 如果给定的 "indexMin和 "indexMax不是调用受限变量数组的有效索引,或者 "indexMin不严格小于 "indexMax,CP 优化器将抛出异常("IloException实例,信息为 ""bad index interval")。
该成员函数返回属于调用约束整数变量数组的变量最小值中的最大值。
该成员函数返回属于调用约束整数变量数组的变量最小值中的最大值。 如果提供参数 "indexMin和 "indexMax,则只考虑与 "[indexMin indexMax)范围内的索引相对应的变量。 如果给定的 "indexMin和 "indexMax不是调用受限变量数组的有效索引,或者 "indexMin不严格小于 "indexMax,CP 优化器将抛出异常("IloException实例,信息为 ""bad index interval")。
该成员函数返回属于调用约束整数变量数组的变量最大值中的最小值。
该成员函数返回属于调用约束整数变量数组的变量最大值中的最小值。 如果提供参数 "indexMin和 "indexMax,则只考虑与 "[indexMin indexMax)范围内的索引相对应的变量。 如果给定的 "indexMin和 "indexMax不是调用受限变量数组的有效索引,或者 "indexMin不严格小于 "indexMax,CP 优化器将抛出异常("IloException实例,信息为 ""bad index interval")。
该成员函数返回属于调用约束整数变量数组的变量最小值。
该成员函数返回属于调用约束整数变量数组的变量最小值。 如果提供参数 "indexMin和 "indexMax,则只考虑与 "[indexMin indexMax)范围内的索引相对应的变量。 如果给定的 "indexMin和 "indexMax不是调用受限变量数组的有效索引,或者 "indexMin不严格小于 "indexMax,CP 优化器将抛出异常("IloException实例,信息为 ""bad index interval")。
该成员函数返回调用数组中变量的个数。
这个下标操作符返回一个受约束的整数表达式。 为了清楚起见,我们称 "A为调用数组。 当 "exp固定为 "i时,表达式的域就是 "A[i]的域。 更一般地说,表达式的域是表达式 "A[i]域的联合,其中 "i位于 "exp域中。
该下标操作符将返回与调用的受限整数变量数组中给定的 "index相对应的受限整数变量的引用。 如果给定的 "index对调用的受限整数变量数组无效,CP 优化器将抛出异常("IloCP::Exception"实例),并提示"bad index"。