Overview | Group | Tree | Graph | Index | Concepts |
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 non-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 *) |
public | IloBoolArray(const IloEnv, IloInt) |
public | IloBoolArray(const IloEnv, IloInt, const IloBool) |
public | IloBoolArray(const IloEnv, IloInt, const IloBool, const IloBool v1...) |
Method Summary | |
---|---|
public void | add(IloInt, const IloBool) |
public void | add(const IloBool) |
public void | add(const IloBoolArray) |
Inherited Methods from IloIntArray |
---|
toNumArray |
Constructor Detail |
---|
This constructor creates an array of Boolean values from an implementation object.
This constructor creates an array of n
Boolean values for
use in a model in the environment indicated by env
. By default,
its elements are empty handles.
This constructor creates an array of n
Boolean values.
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 |
---|
This member function appends x
to the invoking array of
Boolean values; it appends x more
times.
This member function appends the value x
to the invoking
array.
This member function appends the values in the array x
to
the invoking array.