Argument array for variables. More...
#include <array.hpp>
Classes | |
class | VarLess |
Sort order for variables. More... | |
Constructors and initialization | |
VarArgArray (void) | |
Allocate empty array. More... | |
VarArgArray (int n) | |
Allocate array with n elements. More... | |
VarArgArray (const VarArgArray< Var > &a) | |
Initialize from variable argument array a (copy elements) More... | |
VarArgArray (const VarArray< Var > &a) | |
Initialize from variable array a (copy elements) More... | |
VarArgArray (const std::vector< Var > &a) | |
Initialize from vector a. More... | |
template<class InputIterator > | |
VarArgArray (InputIterator first, InputIterator last) | |
Initialize from InputIterator first and last. More... | |
Array elements | |
ArrayTraits< VarArgArray< Var > >::ArgsType | slice (int start, int inc=1, int n=-1) |
Return slice ![]() ![]() ![]() | |
Appending elements | |
ArrayTraits< VarArgArray< Var > >::ArgsType & | operator<< (const Var &x) |
Insert a new element x at the end of the array (increase size by 1) More... | |
ArrayTraits< VarArgArray< Var > >::ArgsType & | operator<< (const VarArgArray< Var > &x) |
Append x to the end of the array. More... | |
bool | assigned (void) const |
Test if all variables are assigned. More... | |
Variable equality | |
bool | same (const Space &home) const |
Test whether array contains same variable multiply. More... | |
bool | same (const Space &home, const Var &y) const |
Test whether array contains variable y. More... | |
bool | same (const Space &home, const VarArgArray< Var > &y) const |
Test whether all elements from array and y contains same variable multiply. More... | |
Argument array for variables.
Argument arrays are used as convenient mechanism of passing arguments when calling functions as they combine both the size and the elements of an array. For a small number of elements, memory is allocated by creating an argument array object. Otherwise the memory is allocated from the heap.
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Gecode::VarArgArray< Var >::same | ( | const Space & | home | ) | const |
bool Gecode::VarArgArray< Var >::same | ( | const Space & | home, |
const Var & | y | ||
) | const |
bool Gecode::VarArgArray< Var >::same | ( | const Space & | home, |
const VarArgArray< Var > & | y | ||
) | const |