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 *)
public IloIntVarArray(const IloEnv, IloInt)
public IloIntVarArray(const IloEnv, const IloIntArray, const IloIntArray)
public IloIntVarArray(const IloEnv, IloInt, const IloIntArray)
public IloIntVarArray(const IloEnv, const IloIntArray, IloInt)
public IloIntVarArray(const IloEnv, IloInt, IloInt, IloInt)
public IloIntVarArray(const IloEnv, const IloNumColumnArray)
public IloIntVarArray(const IloEnv, const IloNumColumnArray, const IloNumArray, const IloNumArray)
public IloIntVarArray(const IloEnv, IloInt, const IloIntVar, const IloIntVar, ...)
Method Summary
public voidadd(IloInt, const IloIntVar)
public voidadd(const IloIntVar)
public voidadd(const IloIntVarArray)
public IloIntExprArgoperator()(IloIntExprArg)
public IloIntVaroperator[](IloInt)
public IloIntVar &operator[](IloInt)
public IloNumVarArraytoNumVarArray()
Inherited Methods from IloIntExprArray
add, add, add, operator(), operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements
Constructor Detail

IloIntVarArray

public IloIntVarArray(IloDefaultArrayI * i)

This constructor creates an empty extensible array of integer variables.


IloIntVarArray

public IloIntVarArray(const IloEnv env, IloInt n)

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 indicated.


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 indicated.


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 indicated.


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 indicated.


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 indicated from a column array.


IloIntVarArray

public IloIntVarArray(const IloEnv env, IloInt n, const IloIntVar v0, const IloIntVar v1, ... )

This constructor creates an extensible array of n integer variables; the elements of the new array take the corresponding values, v0, v1, ..., v(n-1).


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.


operator()

public IloIntExprArg operator()(IloIntExprArg anIntegerVariable)

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


operator[]

public IloIntVar operator[](IloInt 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

IloIntVar operator[] (IloInt i) const;

on const arrays.


operator[]

public IloIntVar & operator[](IloInt i)

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


toNumVarArray

public IloNumVarArray toNumVarArray()

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