NO FRAMES

Class IloBoolArray

Definition file: ilconcert/iloenv.h
IloBoolArray is the array class of the basic Boolean class for a model.

IloBoolArray is the array class of the basic Boolean class for a model. It is a handle class. The implementation class for IloBoolArray is the undocumented class IloBoolArrayI.

Instances of IloBoolArray are extensible. (They differ from instances of IlcBoolArray in this respect.) References to an array change whenever an element is added to or removed from the array.

For each basic type, Concert Technology defines a corresponding array class. That array class is a handle class. In other words, an object of that class contains a pointer to another object allocated in a Concert Technology environment associated with a model. Exploiting handles in this way greatly simplifies the programming interface since the handle can then be an automatic object: as a developer using handles, you do not have to worry about memory allocation.

As handles, these objects should be passed by value, and they should be created as automatic objects, where “automatic” has the usual C++ meaning.

Member functions of a handle class correspond to member functions of the same name in the implementation class.

Assert and NDEBUG

Most member functions of the class IloBoolArray are inline functions that contain an assert statement. This statement checks that the handle pointer is not null. These statements can be suppressed by the macro NDEBUG. This option usually reduces execution time. The price you pay for this choice is that attempts to access through null pointers are not trapped and usually result in memory faults.

See Also:

Constructor Summary
public IloBoolArray(IloArrayI * i=0)
public IloBoolArray(const IloEnv env, IloInt n=0)
public IloBoolArray(const IloEnv env, IloInt n, const IloBool v0, const IloBool v1...)
Method Summary
public voidadd(IloInt more, const IloBool x)
public voidadd(const IloBool x)
public voidadd(const IloBoolArray x)
Inherited Methods from IloIntArray
contains, contains, discard, discard, operator[], operator[], operator[], toNumArray
Constructor Detail

IloBoolArray

public IloBoolArray(IloArrayI * i=0)

This constructor creates an array of Boolean values from an implementation object.


IloBoolArray

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

This constructor creates an array of n Boolean values for use in a model in the environment specified by env. By default, its elements are empty handles.


IloBoolArray

public IloBoolArray(const IloEnv env, IloInt n, const IloBool v0, const IloBool v1...)

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


Method Detail

add

public void add(IloInt more, const IloBool x)

This member function appends x to the invoking array of Boolean values; it appends x more times.


add

public void add(const IloBool x)

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


add

public void add(const IloBoolArray x)

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