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

对于每种基本类型,Concert Technology 都定义了相应的数组类。 IloConstraintArray是模型的约束条件数组类。
IloConstraintArray的实例是可扩展的。 也就是说,你可以在这样的数组中添加更多元素。 每当从数组中添加或删除一个元素时,数组的引用就会发生变化。
该类中的大多数成员函数都包含 "assert语句。 有关宏 "NDEBUG(打开或关闭这些 "assert语句的方法)的解释,请参阅Assert 和 NDEBUG 概念。
另请参阅:
IloConstraint,operator>>,operator<<
| 方法概要 | |
|---|---|
public void | add(IloInt more, const IloConstraint x) |
public void | add(const IloConstraint x) |
public void | add(const IloConstraintArray x) |
public | IloConstraintArray(IloDefaultArrayI * i=0) |
public | IloConstraintArray(const IloConstraintArray & copy) |
public | IloConstraintArray(const IloEnv env, IloInt n=0) |
public IloConstraint | operator[](IloInt i) const |
public IloConstraint & | operator[](IloInt i) |
从 "IloExtractableArray继承的方法 |
|---|
add, add, add, endElements, IloExtractableArray, IloExtractableArray, IloExtractableArray, removeFromAll, setNames |
| 方法详细信息 |
|---|
该构造函数创建一个空数组。 您不能创建未注明的类 "IloDefaultArrayI的实例。 作为该默认构造函数的参数,它允许你在接受数组作为参数的函数和成员函数中将 0(零)作为可选参数传递。
这个复制构造函数复制了由 "copy指定的数组。
该构造函数创建了一个由 "n元素组成的数组,每个元素都是一个空句柄。
该成员函数会在调用数组中多次追加 "constraint。 参数 "more指定次数。
该成员函数将 "constraint添加到调用数组中。
该成员函数将 "array中的元素追加到调用数组中。
该操作符返回调用数组中位于索引 "i指定位置的约束引用。 在 "const数组上,Concert Technology 使用 "const操作符:
IloConstraintoperator[]IloInti) const;
该操作符返回调用数组中位于索引 "i指定位置的约束引用。