NO FRAMES

Class IloNumArray

Definition file: ilconcert/iloenv.h

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.

See Also:

Constructor Summary
public IloNumArray(IloArrayI *)
public IloNumArray(const IloNumArray &)
public IloNumArray(const IloEnv, IloInt)
public IloNumArray(const IloEnv, IloInt, IloNum, IloNum, ...)
Method Summary
public IloNumExprArgoperator()(IloNumExprArg)
public IloIntArraytoIntArray()
Constructor Detail

IloNumArray

public IloNumArray(IloArrayI * i)

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.


IloNumArray

public IloNumArray(const IloNumArray & cpy)

This copy constructor creates a handle to the array of floating-point objects indicated by copy.


IloNumArray

public IloNumArray(const IloEnv env, IloInt n)

This constructor creates an array of n elements. Initially, the n elements are empty handles.


IloNumArray

public IloNumArray(const IloEnv env, IloInt n, IloNum f0, IloNum f1, ... )

This constructor creates an array of n floating-point objects for use in a model.


Method Detail

operator()

public IloNumExprArg operator()(IloNumExprArg )

This subscripting operator returns an expression node for use in a constraint or expression. For clarity, let's call A the invoking array. When anIntegerVariable 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 anIntegerVariable.

This operator is also known as an element constraint.


toIntArray

public IloIntArray toIntArray()

This member function copies the invoking array to a new IloIntVarArray, checking the type of the variables during the copy.