NO FRAMES

Class IloBoolVarArray

Definition file: ilconcert/iloexpression.h

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 *)
public IloBoolVarArray(const IloEnv, IloInt)
public IloBoolVarArray(const IloEnv, const IloNumColumnArray)
public IloBoolVarArray(const IloEnv, IloInt, const IloBoolVar, const IloBoolVar, ...)
Method Summary
public voidadd(IloInt, const IloBoolVar)
public voidadd(const IloBoolVar)
public voidadd(const IloBoolVarArray)
public IloBoolVaroperator[](IloInt)
public IloBoolVar &operator[](IloInt)
Inherited Methods from IloIntVarArray
add, add, add, operator(), operator[], operator[], toNumVarArray
Inherited Methods from IloIntExprArray
add, add, add, operator(), operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements
Constructor Detail

IloBoolVarArray

public IloBoolVarArray(IloDefaultArrayI * i)

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.


IloBoolVarArray

public IloBoolVarArray(const IloEnv env, IloInt n, const IloBoolVar v0, const IloBoolVar v1, ... )

This constructor creates an extensible array of n Boolean 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 IloBoolVar x)

This member function appends x to the invoking array of Boolean variables; it appends xmore 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)

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

IloBoolVar operator[] (IloInt i) const;

on const arrays.


operator[]

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