Boolean variable array. More...
#include <int.hh>
Creation and initialization | |
BoolVarArray (void) | |
Default constructor (array of size 0) More... | |
BoolVarArray (Space &home, int n) | |
Allocate array for n Boolean variables (variables are uninitialized) More... | |
BoolVarArray (const BoolVarArray &a) | |
Initialize from Boolean variable array a (share elements) More... | |
BoolVarArray (Space &home, const BoolVarArgs &a) | |
Initialize from Boolean variable argument array a (copy elements) More... | |
BoolVarArray (Space &home, int n, int min, int max) | |
Initialize array with n new variables. More... | |
Additional Inherited Members | |
![]() | |
typedef BoolVar | value_type |
Type of the variable stored in this array. More... | |
typedef BoolVar & | reference |
Type of a reference to the value type. More... | |
typedef const BoolVar & | const_reference |
Type of a constant reference to the value type. More... | |
typedef BoolVar * | pointer |
Type of a pointer to the value type. More... | |
typedef const BoolVar * | const_pointer |
Type of a read-only pointer to the value type. More... | |
typedef BoolVar * | iterator |
Type of the iterator used to iterate through this array's elements. More... | |
typedef const BoolVar * | const_iterator |
Type of the iterator used to iterate read-only through this array's elements. More... | |
typedef std::reverse_iterator< BoolVar * > | reverse_iterator |
Type of the iterator used to iterate backwards through this array's elements. More... | |
typedef std::reverse_iterator< const BoolVar * > | const_reverse_iterator |
Type of the iterator used to iterate backwards and read-only through this array's elements. More... | |
![]() | |
bool | assigned (void) const |
Test if all variables are assigned. More... | |
VarArray (void) | |
Default constructor (array of size 0) More... | |
VarArray (Space &home, int m) | |
Allocate array with m variables. More... | |
VarArray (Space &home, const VarArgArray< BoolVar > &) | |
Initialize from variable argument array a (copy elements) More... | |
VarArray (const VarArray< BoolVar > &a) | |
Initialize from variable array a (share elements) More... | |
const VarArray< BoolVar > & | operator= (const VarArray< BoolVar > &a) |
Initialize from variable array a (share elements) More... | |
int | size (void) const |
Return size of array (number of elements) More... | |
BoolVar & | operator[] (int i) |
Return variable at position i. More... | |
const BoolVar & | operator[] (int i) const |
Return variable at position i. More... | |
ArrayTraits< VarArgArray< BoolVar > >::ArgsType | slice (int start, int inc=1, int n=-1) |
iterator | begin (void) |
Return an iterator at the beginning of the array. More... | |
const_iterator | begin (void) const |
Return a read-only iterator at the beginning of the array. More... | |
iterator | end (void) |
Return an iterator past the end of the array. More... | |
const_iterator | end (void) const |
Return a read-only iterator past the end of the array. More... | |
reverse_iterator | rbegin (void) |
Return a reverse iterator at the end of the array. More... | |
const_reverse_iterator | rbegin (void) const |
Return a reverse and read-only iterator at the end of the array. More... | |
reverse_iterator | rend (void) |
Return a reverse iterator past the beginning of the array. More... | |
const_reverse_iterator | rend (void) const |
Return a reverse and read-only iterator past the beginning of the array. More... | |
void | update (Space &, bool share, VarArray< BoolVar > &a) |
Update array to be a clone of array a. More... | |
![]() | |
int | n |
Number of variables (size) More... | |
BoolVar * | x |
Array of variables. More... | |
|
inline |
|
inline |
|
inline |
|
inline |
Gecode::BoolVarArray::BoolVarArray | ( | Space & | home, |
int | n, | ||
int | min, | ||
int | max | ||
) |
Initialize array with n new variables.
The variables are created with a domain ranging from min to max. The following execptions might be thrown: