
Argument array for non-primitive types. More...
#include <array.hpp>
Friends | |
| ArrayTraits< ArgArray< T > >::ArgsType | operator+ (const ArgArray< T > &x, const ArgArray< T > &y) |
| ArrayTraits< ArgArray< T > >::ArgsType | operator+ (const ArgArray< T > &x, const T &y) |
| ArrayTraits< ArgArray< T > >::ArgsType | operator+ (const T &x, const ArgArray< T > &y) |
Related Functions | |
(Note that these are not member functions.) | |
| template<class T > | |
| ArrayTraits< ArgArray< T > >::ArgsType | operator+ (const ArgArray< T > &x, const ArgArray< T > &y) |
| template<class T > | |
| ArrayTraits< ArgArray< T > >::ArgsType | operator+ (const ArgArray< T > &x, const T &y) |
| template<class T > | |
| ArrayTraits< ArgArray< T > >::ArgsType | operator+ (const T &x, const ArgArray< T > &y) |
| template<class Var > | |
| ArrayTraits< VarArgArray< Var > >::ArgsType | operator+ (const VarArgArray< Var > &x, const VarArgArray< Var > &y) |
| template<class Var > | |
| ArrayTraits< VarArgArray< Var > >::ArgsType | operator+ (const VarArgArray< Var > &x, const Var &y) |
| template<class Var > | |
| ArrayTraits< VarArgArray< Var > >::ArgsType | operator+ (const Var &x, const VarArgArray< Var > &y) |
Constructors and initialization | |
| ArgArray (void) | |
| Allocate empty array. | |
| ArgArray (int n) | |
| Allocate array with n elements. | |
| ArgArray (int n, const T *e) | |
| Allocate array with n elements and initialize with elements from array e. | |
| ArgArray (const ArgArray< T > &a) | |
| Initialize from primitive argument array a (copy elements) | |
Array elements | |
| ArrayTraits< ArgArray< T > >::ArgsType | slice (int start, int inc=1, int n=-1) |
Return slice of length n such that forall , . | |
Appending elements | |
| ArrayTraits< ArgArray< T > >::ArgsType & | operator<< (const T &x) |
| Insert a new element x at the end of the array (increase size by 1) | |
| ArrayTraits< ArgArray< T > >::ArgsType & | operator<< (const ArgArray< T > &x) |
| Append x to the end of the array. | |
Argument array for non-primitive types.
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.
| Gecode::ArgArray< T >::ArgArray | ( | void | ) | [inline] |
| Gecode::ArgArray< T >::ArgArray | ( | int | n | ) | [inline, explicit] |
| Gecode::ArgArray< T >::ArgArray | ( | int | n, |
| const T * | e | ||
| ) |
| Gecode::ArgArray< T >::ArgArray | ( | const ArgArray< T > & | a | ) | [inline] |
| ArrayTraits< ArgArray< T > >::ArgsType Gecode::ArgArray< T >::slice | ( | int | start, |
| int | inc = 1, |
||
| int | n = -1 |
||
| ) | [inline] |
Return slice
of length n such that forall
,
.
Reimplemented from Gecode::ArgArrayBase< T >.
| ArrayTraits< ArgArray< T > >::ArgsType & Gecode::ArgArray< T >::operator<< | ( | const T & | x | ) | [inline] |
| ArrayTraits< ArgArray< T > >::ArgsType & Gecode::ArgArray< T >::operator<< | ( | const ArgArray< T > & | x | ) | [inline] |
| ArrayTraits<ArgArray<T> >::ArgsType operator+ | ( | const ArgArray< T > & | x, |
| const ArgArray< T > & | y | ||
| ) | [friend] |
| ArrayTraits<ArgArray<T> >::ArgsType operator+ | ( | const ArgArray< T > & | x, |
| const T & | y | ||
| ) | [friend] |
| ArrayTraits<ArgArray<T> >::ArgsType operator+ | ( | const T & | x, |
| const ArgArray< T > & | y | ||
| ) | [friend] |
| ArrayTraits< ArgArray< T > >::ArgsType operator+ | ( | const ArgArray< T > & | x, |
| const ArgArray< T > & | y | ||
| ) | [related] |
| ArrayTraits< ArgArray< T > >::ArgsType operator+ | ( | const ArgArray< T > & | x, |
| const T & | y | ||
| ) | [related] |
| ArrayTraits< ArgArray< T > >::ArgsType operator+ | ( | const T & | x, |
| const ArgArray< T > & | y | ||
| ) | [related] |
| ArrayTraits< VarArgArray< Var > >::ArgsType operator+ | ( | const VarArgArray< Var > & | x, |
| const VarArgArray< Var > & | y | ||
| ) | [related] |
| ArrayTraits< VarArgArray< Var > >::ArgsType operator+ | ( | const VarArgArray< Var > & | x, |
| const Var & | y | ||
| ) | [related] |
| ArrayTraits< VarArgArray< Var > >::ArgsType operator+ | ( | const Var & | x, |
| const VarArgArray< Var > & | y | ||
| ) | [related] |