Overview | Group | Tree | Graph | Index | Concepts |
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 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 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 copy constructor creates a handle to the array of floating-point
objects specified 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 operator returns a reference to the object
located in the invoking array at the position
specified by the index i
.
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:
IloArray operator[] (IloInt i) const;
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 expression.
This member function copies the invoking numeric array to a new
instance of
IloIntArray
, checking the type of the values during the
copy.