Overview | Group | Tree | Graph | Index | Concepts |
For each basic type, Concert Technology defines a
corresponding array class.
IloIntVarArray
is the array class of the
integer variable class for a model. It is a handle class.
Instances of IloIntVarArray
are extensible.
Most member functions in this class contain assert
statements. For an
explanation of the macro NDEBUG
(a way to turn on or turn off these
assert
statements), see the concept
Assert and NDEBUG.
Elements of the array are handles to integer variables.
The lower and upper bounds
of an integer variable must be an integer. See the documentation of
IloIntVar
for details about bounds of the elements of an array of this class.
See Also:
Constructor Summary | |
---|---|
public | IloIntVarArray(IloDefaultArrayI * i=0) |
public | IloIntVarArray(const IloEnv env, IloInt n=0) |
public | IloIntVarArray(const IloEnv env, const IloIntArray lb, const IloIntArray ub) |
public | IloIntVarArray(const IloEnv env, IloInt lb, const IloIntArray ub) |
public | IloIntVarArray(const IloEnv env, const IloIntArray lb, IloInt ub) |
public | IloIntVarArray(const IloEnv env, IloInt n, IloInt lb, IloInt ub) |
public | IloIntVarArray(const IloEnv env, const IloNumColumnArray columnarray) |
public | IloIntVarArray(const IloEnv env, const IloNumColumnArray columnarray, const IloNumArray lb, const IloNumArray ub) |
Method Summary | |
---|---|
public void | add(IloInt more, const IloIntVar x) |
public void | add(const IloIntVar x) |
public void | add(const IloIntVarArray x) |
public void | endElements() |
public IloIntVar | operator[](IloInt i) const |
public IloIntVar & | operator[](IloInt i) |
public IloIntExprArg | operator[](IloIntExprArg anIntegerExpr) const |
public IloNumVarArray | toNumVarArray() const |
Inherited Methods from IloIntExprArray |
---|
add, add, add, endElements, operator[], operator[], operator[] |
Inherited Methods from IloExtractableArray |
---|
add, add, add, endElements, setNames |
Constructor Detail |
---|
This constructor creates an empty extensible array of integer variables.
This constructor creates an extensible array of n
integer variables.
This constructor creates an extensible array of integer variables with lower and upper bounds as specified.
This constructor creates an extensible array of integer variables with a lower bound and an array of upper bounds as specified.
This constructor creates an extensible array of integer variables with an array of lower bounds and an upper bound as specified.
This constructor creates an extensible array
of n
integer variables, with a
lower and an upper bound as specified.
This constructor creates an extensible array of integer variables from a column array.
This constructor creates an extensible array of integer variables with lower and upper bounds as specified from a column array.
Method Detail |
---|
This member function appends x
to the invoking array of integer
variables; it appends x more
times.
This member function appends the value x
to the invoking array.
This member function appends the variables in the array x
to the
invoking array.
This member function calls IloExtractable::end
for
each of the elements in the invoking array. This deletes all the extractables
identified by the array, leaving the handles in the array intact.
This member function is
the recommended way to delete the elements of an array.
This operator returns a reference to the object
located in the invoking array at the position
specified by the index i
.
On const
arrays,
Concert Technology uses the const
operator
IloIntVar operator[] (IloInt i) const;
This operator returns a reference to the extractable object
located in the invoking array at the position
specified by the index i
.
This subscripting operator returns an expression argument for use in a constraint or
expression. For clarity, let's call A
the invoking array. When
anIntegerExpr
is bound to the value i
, the domain of the
expression is the domain of A[i]
. More generally, the domain of the expression
is the union of the domains of the expressions A[i]
where the i
are in the domain of anIntegerExpr
.
This operator is also known as an element expression.
This member function copies the invoking array into a new
IloNumVarArray
.