Skip to main content
FRAMES NO FRAMES

Class IloNumExprArray

Definition file: ilconcert/iloexpression.h
Map of IloNumExprArrayIloNumExprArrayIloExprArrayIloNumVarArrayIloNumExprArrayIloExtractableArray
The array class of the numeric expressions class.

For each basic type, Concert Technology defines a corresponding array class. IloNumExprArray is the array class of the numeric expressions class (IloNumExpr) for a model.

Instances of IloNumExprArray 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.

Method Summary
public voidadd(IloInt more, const IloNumExpr x)
public voidadd(const IloNumExpr x)
public voidadd(const IloNumExprArray array)
public IloNumExprArray(IloDefaultArrayI * i=0)
public IloNumExprArray(const IloEnv env, IloInt n=0)
public IloNumExprArgoperator[](IloIntExprArg anIntegerExpr) const
Inherited Methods from IloExtractableArray
add, add, add, endElements, IloExtractableArray, IloExtractableArray, IloExtractableArray, removeFromAll, setNames
Method Detail

IloNumExprArray

public IloNumExprArray(IloDefaultArrayI * i=0)

This constructor creates an empty array of numeric expressions 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.


IloNumExprArray

public IloNumExprArray(const IloEnv env, IloInt n=0)

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


add

public void add(IloInt more, const IloNumExpr x)

This member function appends x to the invoking array. The argument more specifies how many times.


add

public void add(const IloNumExpr x)

This member function appends x to the invoking array.


add

public void add(const IloNumExprArray array)

This member function appends the elements in array to the invoking array.


operator[]

public IloNumExprArg operator[](IloIntExprArg anIntegerExpr) const

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.