NO FRAMES

Class IloIntVarArray

Definition file: ilconcert/iloexpression.h
The array class of IloIntVar.

For each basic type, Concert Technology defines a corresponding array class. IloIntVarArray is the array class of the integer variable class for a model. It is a handle class.

Instances of IloIntVarArray are extensible.

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 IloIntVarArray(IloDefaultArrayI * i=0)
public IloIntVarArray(const IloEnv env, IloInt n=0)
public IloIntVarArray(const IloEnv env, const IloIntArray lb, const IloIntArray ub)
public IloIntVarArray(const IloEnv env, IloInt lb, const IloIntArray ub)
public IloIntVarArray(const IloEnv env, const IloIntArray lb, IloInt ub)
public IloIntVarArray(const IloEnv env, IloInt n, IloInt lb, IloInt ub)
public IloIntVarArray(const IloEnv env, const IloNumColumnArray columnarray)
public IloIntVarArray(const IloEnv env, const IloNumColumnArray columnarray, const IloNumArray lb, const IloNumArray ub)
Method Summary
public voidadd(IloInt more, const IloIntVar x)
public voidadd(const IloIntVar x)
public voidadd(const IloIntVarArray x)
public voidendElements()
public IloIntVaroperator[](IloInt i) const
public IloIntVar &operator[](IloInt i)
public IloIntExprArgoperator[](IloIntExprArg anIntegerExpr) const
public IloNumVarArraytoNumVarArray() const
Inherited Methods from IloIntExprArray
add, add, add, endElements, operator[], operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements, setNames
Constructor Detail

IloIntVarArray

public IloIntVarArray(IloDefaultArrayI * i=0)

This constructor creates an empty extensible array of integer variables.


IloIntVarArray

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

This constructor creates an extensible array of n integer variables.


IloIntVarArray

public IloIntVarArray(const IloEnv env, const IloIntArray lb, const IloIntArray ub)

This constructor creates an extensible array of integer variables with lower and upper bounds as specified.


IloIntVarArray

public IloIntVarArray(const IloEnv env, IloInt lb, const IloIntArray ub)

This constructor creates an extensible array of integer variables with a lower bound and an array of upper bounds as specified.


IloIntVarArray

public IloIntVarArray(const IloEnv env, const IloIntArray lb, IloInt ub)

This constructor creates an extensible array of integer variables with an array of lower bounds and an upper bound as specified.


IloIntVarArray

public IloIntVarArray(const IloEnv env, IloInt n, IloInt lb, IloInt ub)

This constructor creates an extensible array of n integer variables, with a lower and an upper bound as specified.


IloIntVarArray

public IloIntVarArray(const IloEnv env, const IloNumColumnArray columnarray)

This constructor creates an extensible array of integer variables from a column array.


IloIntVarArray

public IloIntVarArray(const IloEnv env, const IloNumColumnArray columnarray, const IloNumArray lb, const IloNumArray ub)

This constructor creates an extensible array of integer variables with lower and upper bounds as specified from a column array.


Method Detail

add

public void add(IloInt more, const IloIntVar x)

This member function appends x to the invoking array of integer variables; it appends x more times.


add

public void add(const IloIntVar x)

This member function appends the value x to the invoking array.


add

public void add(const IloIntVarArray x)

This member function appends the variables in the array x to the invoking array.


endElements

public void endElements()

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.


operator[]

public IloIntVar operator[](IloInt i) const

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

 IloIntVar operator[] (IloInt i) const;
 

operator[]

public IloIntVar & operator[](IloInt i)

This operator returns a reference to the extractable object located in the invoking array at the position specified by the index i.


operator[]

public IloIntExprArg 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 constraint.


toNumVarArray

public IloNumVarArray toNumVarArray() const

This member function copies the invoking array into a new IloNumVarArray.