Overview | Group | Tree | Graph | Index | Concepts |
For each basic type, Concert Technology defines a corresponding array
class. IloNumVarArray
is the array class of the numeric
variable class for a model.
Instances of IloNumVarArray
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.
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.
See Also:
IloAllDiff, IloModel, IloNumVar, operator>>, operator<<
Constructor Summary | |
---|---|
public | IloNumVarArray(IloDefaultArrayI * i=0) |
public | IloNumVarArray(const IloEnv env, IloInt n=0) |
public | IloNumVarArray(const IloEnv env, const IloNumArray lb, const IloNumArray ub, IloNumVar::Type type=ILOFLOAT) |
public | IloNumVarArray(const IloEnv env, IloNum lb, const IloNumArray ub, IloNumVar::Type type=ILOFLOAT) |
public | IloNumVarArray(const IloEnv env, const IloNumArray lb, IloNum ub, IloNumVar::Type type=ILOFLOAT) |
public | IloNumVarArray(const IloEnv env, IloInt n, IloNum lb, IloNum ub, IloNumVar::Type type=ILOFLOAT) |
public | IloNumVarArray(const IloEnv env, const IloNumColumnArray columnarray, IloNumVar::Type type=ILOFLOAT) |
public | IloNumVarArray(const IloEnv env, const IloNumColumnArray columnarray, const IloNumArray lb, const IloNumArray ub, IloNumVar::Type type=ILOFLOAT) |
Method Summary | |
---|---|
public void | add(IloInt more, const IloNumVar x) |
public void | add(const IloNumVar x) |
public void | add(const IloNumVarArray array) |
public void | endElements() |
public IloNumExprArg | operator[](IloIntExprArg anIntegerExpr) const |
public void | setBounds(const IloNumArray lb, const IloNumArray ub) |
public IloIntExprArray | toIntExprArray() const |
public IloIntVarArray | toIntVarArray() const |
public IloNumExprArray | toNumExprArray() const |
Inherited Methods from IloNumExprArray |
---|
add, add, add, endElements, operator[] |
Inherited Methods from IloExtractableArray |
---|
add, add, add, endElements, setNames |
Constructor Detail |
---|
This constructor creates an empty extensible array of numeric
variables. You cannot create instances of the undocumented class
IloDefaultArrayI
. As an argument in this default constructor,
it allows you to pass 0 (zero) optionally or to use 0 (zero) as a default
value of an argument in a constructor.
This constructor creates an extensible array of n
numeric
variables in env
. Initially, the n
elements are
empty handles.
This constructor creates an extensible array of numeric variables in
env
with lower and upper bounds and type as specified. The
instances of IloNumVar
to fill this array
are constructed at the same time. The length of the array lb
must be the same as the length of the array ub
. In other words,
lb.getSize == ub.getSize
. This constructor will construct an
array with the number of elements in the array ub
.
This constructor creates an extensible array of numeric variables in
env
with lower and upper bounds and type as specified. The
instances of IloNumVar
to fill this array
are constructed at the same time. The length of the new array will be the
same as the length of the array ub
.
This constructor creates an extensible array of numeric variables in
env
with lower and upper bounds and type as specified. The
instances of IloNumVar
to fill this array
are constructed at the same time.
This constructor creates an extensible array of n
numeric
variables in env
with lower and upper bounds and type as
specified. The instances of IloNumVar
to
fill this array are constructed at the same time.
This constructor creates an extensible array of numeric variables with
type as specified. The instances of
IloNumVar
to fill this array are constructed at the same time.
This constructor creates an extensible array of numeric variables with
lower and upper bounds and type as specified. The instances of
IloNumVar
to fill this array are constructed
at the same time.
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.
For each element in the invoking array, this member function sets
lb
as the lower bound and ub
as the upper bound of
the corresponding numeric variable in the invoking array.
setBounds
notifies Concert
Technology algorithms about this change of bounds in this array of numeric
variables. This member function copies the invoking array to a new
IloIntExprArray
, checking the type of the variables during the
copy.
This member function copies the invoking array to a new
IloIntVarArray
, checking the type of the variables during the
copy.
This member function copies the invoking array to a new
IloNumExprArray
, checking the type of the variables during the
copy.