NO FRAMES

Class IloBoolVarArray

Definition file: ilconcert/iloexpression.h
IloBoolVarArray is the array class of the Boolean variable class.

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

Instances of IloBoolVarArray 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 IloBoolVarArray(IloDefaultArrayI * i=0)
public IloBoolVarArray(const IloEnv env, IloInt n)
public IloBoolVarArray(const IloEnv env, const IloNumColumnArray columnarray)
Method Summary
public voidadd(IloInt more, const IloBoolVar x)
public voidadd(const IloBoolVar x)
public voidadd(const IloBoolVarArray x)
public IloBoolVaroperator[](IloInt i) const
public IloBoolVar &operator[](IloInt i)
public IloIntExprArgoperator[](IloIntExprArg anIntegerExpr) const
Inherited Methods from IloIntVarArray
add, add, add, endElements, operator[], operator[], operator[], toNumVarArray
Inherited Methods from IloIntExprArray
add, add, add, endElements, operator[], operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements, setNames
Constructor Detail

IloBoolVarArray

public IloBoolVarArray(IloDefaultArrayI * i=0)

This constructor creates an empty extensible array of Boolean variables.


IloBoolVarArray

public IloBoolVarArray(const IloEnv env, IloInt n)

This constructor creates an extensible array of n Boolean variables.


IloBoolVarArray

public IloBoolVarArray(const IloEnv env, const IloNumColumnArray columnarray)

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


Method Detail

add

public void add(IloInt more, const IloBoolVar x)

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


add

public void add(const IloBoolVar x)

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


add

public void add(const IloBoolVarArray x)

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


operator[]

public IloBoolVar operator[](IloInt i) const

This operator returns a reference to the extractable object located in the invoking array at the position specified by the index i. On const arrays, Concert Technology uses the const operator:

 IloBoolVar operator[] (IloInt i) const;
 

operator[]

public IloBoolVar & 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.