Overview | Group | Tree | Graph | Index | Concepts |
IloNumArray
is the array class of the basic floating-point class.
For each basic type, Concert Technology defines a corresponding array
class. IloNumArray
is the array class of the basic
floating-point class (IloNum
) for a
model.
Instances of IloNumArray
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.
IloNumArray
inherits additional methods from the template
IloArray
:
See Also:
IloNum, operator>>, operator<<
Constructor Summary | |
---|---|
public | IloNumArray(IloArrayI * i=0) |
public | IloNumArray(const IloNumArray & cpy) |
public | IloNumArray(const IloEnv env, IloInt n=0) |
public | IloNumArray(const IloEnv env, IloInt n, IloNum f0, IloNum f1, ...) |
Method Summary | |
---|---|
public IloBool | contains(IloNum value) const |
public IloNumExprArg | operator()(IloNumExprArg intExp) const |
public IloNum & | operator[](IloInt i) |
public const IloNum & | operator[](IloInt i) const |
public IloNumExprArg | operator[](IloIntExprArg intExp) const |
public IloIntArray | toIntArray() const |
Constructor Detail |
---|
This constructor creates an empty array of floating-point numbers for use
in a model. You cannot create instances of the undocumented class
IloDefaultArrayI
. As a parameter in this default constructor,
it allows you to pass 0 (zero) as a value to an optional parameter in
functions and member functions that accept an array as a parameter.
This copy constructor creates a handle to the array of floating-point
objects indicated by cpy
.
This constructor creates an array of n
elements. Initially,
the n
elements are empty handles.
This constructor creates an array of n
floating-point
objects for use in a model.
Method Detail |
---|
This member function checks whether the value is contained or not.
This subscripting operator is deprecated.
It must be replaced by the operator
IloNumExprArg operator[] (IloIntExprArg intExp) const;
This operator returns a reference to the object located in the invoking array at the position
indicated by the index i
.
This operator returns a reference to the object located in the invoking array at the position
indicated by the index i
. Concert Technology uses the const
operator
IloArray operator[] (IloInt i) const;
on
const
arrays.
This subscripting operator returns an expression node for use in a
constraint or expression. For clarity, let's call A
the
invoking array. When intExp
is bound to the value
i
, then 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 intExp
.
This operator is also known as an element constraint.
This member function copies the invoking array to a new
IloIntVarArray
, checking the type of the variables during the
copy.