Overview | Group | Tree | Graph | Index | Concepts |
For each basic type, Concert Technology defines a corresponding array class.
IloIntExprArray
is the array class of the integer expressions class
(IloIntExpr
) for a model.
Instances of IloIntExprArray
are extensible. That is, you can add
more elements to such an array. References to an array change whenever an element
is added to or removed from the array.
Constructor Summary | |
---|---|
public | IloIntExprArray(IloDefaultArrayI * i=0) |
public | IloIntExprArray(const IloEnv env, IloInt n=0) |
Method Summary | |
---|---|
public void | add(IloInt more, const IloIntExpr x) |
public void | add(const IloIntExpr x) |
public void | add(const IloIntExprArray array) |
public void | endElements() |
public IloIntExprArg | operator[](IloIntExprArg anIntegerExpr) const |
public IloIntExpr | operator[](IloInt i) const |
public IloIntExpr & | operator[](IloInt i) |
Inherited Methods from IloExtractableArray |
---|
add, add, add, endElements, setNames |
Constructor Detail |
---|
This constructor creates an empty array of elements. You cannot create
instances of the undocumented class IloDefaultArrayI
. As
an argument in this default constructor,
it allows you to pass 0 (zero) as a
value to an optional argument in functions and
member functions that accept an array as an argument.
This constructor creates an array of n elements. Initially, the n elements are empty handles.
Method Detail |
---|
This member function appends x
to the invoking array multiple times.
The argument more
specifies how many times.
This member function appends x
to the invoking array.
This member function appends the elements in array
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 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 operator returns a reference to the extractable object
located in the invoking array at the position
specified by the index i
.
On const
arrays,
Concert Technology uses the const
operator:
IloIntExpr 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
.