Gecode::ViewArray< View > Class Template Reference
[Programming actors]
Detailed Description
template<class View>
class Gecode::ViewArray< View >
View arrays.
View arrays store views. They are typically used for storing the views with which propagators and branchings compute.
Definition at line 131 of file array.icc.
Constructors and initialization | |
| ViewArray (void) | |
| Default constructor (array of size 0). | |
| ViewArray (Space *home, int m) | |
| Allocate array with m variables. | |
| ViewArray (const ViewArray< View > &a) | |
| Initialize from view array a (share elements). | |
| ViewArray (Space *home, const Reflection::VarMap &vars, Reflection::Arg *spec) | |
| Initialize from specification spec with variables vars. | |
| ViewArray (Space *home, const ViewArray< View > &a) | |
| Initialize from view array a (copy elements). | |
| const ViewArray< View > & | operator= (const ViewArray< View > &a) |
| Initialize from view array a (share elements). | |
| template<class Var> | |
| ViewArray (Space *home, const VarArgArray< Var > &a) | |
| Initialize from variable argument array a (copy elements). | |
Array size | |
| int | size (void) const |
| Return size of array (number of elements). | |
| void | size (int n) |
| Decrease size of array (number of elements). | |
Array elements | |
| View & | operator[] (int i) |
| Return view at position i. | |
| const View & | operator[] (int i) const |
| Return view at position i. | |
Dependencies | |
| void | subscribe (Space *home, Propagator *p, PropCond pc, bool process=true) |
| Subscribe propagator p with propagation condition pc to variable. | |
| void | cancel (Space *home, Propagator *p, PropCond pc) |
| Cancel subscription of propagator p with propagation condition pc to all views. | |
| void | subscribe (Space *home, Advisor *a) |
| Subscribe advisor a to variable. | |
| void | cancel (Space *home, Advisor *a) |
| Cancel subscription of advisor a. | |
Cloning | |
| void | update (Space *, bool share, ViewArray< View > &a) |
| Update array to be a clone of array a. | |
Moving elements | |
| void | move_fst (int i) |
| Move assigned view from position 0 to position i (shift elements to the left). | |
| void | move_lst (int i) |
Move assigned view from position size()-1 to position i (truncate array by one). | |
| void | move_fst (int i, Space *home, Propagator *p, PropCond pc) |
| Move view from position 0 to position i (shift elements to the left). | |
| void | move_lst (int i, Space *home, Propagator *p, PropCond pc) |
Move view from position size()-1 to position i (truncate array by one). | |
| void | move_fst (int i, Space *home, Advisor *a) |
| Move view from position 0 to position i (shift elements to the left). | |
| void | move_lst (int i, Space *home, Advisor *a) |
Move view from position size()-1 to position i (truncate array by one). | |
Dropping elements | |
| void | drop_fst (int i) |
| Drop assigned views from positions 0 to i-1 from array. | |
| void | drop_lst (int i) |
Drop assigned views from positions i+1 to size()-1 from array. | |
| void | drop_fst (int i, Space *home, Propagator *p, PropCond pc) |
| Drop views from positions 0 to i-1 from array. | |
| void | drop_lst (int i, Space *home, Propagator *p, PropCond pc) |
Drop assigned views from positions i+1 to size()-1 from array. | |
| void | drop_fst (int i, Space *home, Advisor *a) |
| Drop views from positions 0 to i-1 from array. | |
| void | drop_lst (int i, Space *home, Advisor *a) |
Drop assigned views from positions i+1 to size()-1 from array. | |
View equality | |
| bool | same (void) const |
| Test whether array has multiple occurence of the same view. | |
| bool | same (const View &y) const |
| Test whether array contains a view being the same as y. | |
| void | unique (void) |
| Remove all duplicate views from array (changes element order). | |
View sharing | |
| bool | shared (void) const |
| Test whether array contains shared views. | |
| bool | shared (const View &y) const |
| Test whether array contains a view being shared with y. | |
Reflection | |
| Reflection::Arg * | spec (const Space *home, Reflection::VarMap &m) const |
Constructor & Destructor Documentation
template<class View>
| Gecode::ViewArray< View >::ViewArray | ( | void | ) | [inline] |
template<class View>
| Gecode::ViewArray< View >::ViewArray | ( | Space * | home, | |
| int | m | |||
| ) | [inline] |
template<class View>
| Gecode::ViewArray< View >::ViewArray | ( | const ViewArray< View > & | a | ) | [inline] |
template<class View>
| Gecode::ViewArray< View >::ViewArray | ( | Space * | home, | |
| const Reflection::VarMap & | vars, | |||
| Reflection::Arg * | spec | |||
| ) | [inline] |
template<class View>
| Gecode::ViewArray< View >::ViewArray | ( | Space * | home, | |
| const ViewArray< View > & | a | |||
| ) | [inline] |
template<class View>
template<class Var>
| Gecode::ViewArray< View >::ViewArray | ( | Space * | home, | |
| const VarArgArray< Var > & | a | |||
| ) | [inline] |
Member Function Documentation
template<class View>
| const ViewArray< View > & Gecode::ViewArray< View >::operator= | ( | const ViewArray< View > & | a | ) | [inline] |
template<class View>
| int Gecode::ViewArray< View >::size | ( | void | ) | const [inline] |
template<class View>
| void Gecode::ViewArray< View >::size | ( | int | n | ) | [inline] |
template<class View>
| View & Gecode::ViewArray< View >::operator[] | ( | int | i | ) | [inline] |
template<class View>
| const View & Gecode::ViewArray< View >::operator[] | ( | int | i | ) | const [inline] |
template<class View>
| void Gecode::ViewArray< View >::subscribe | ( | Space * | home, | |
| Propagator * | p, | |||
| PropCond | pc, | |||
| bool | process = true | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::cancel | ( | Space * | home, | |
| Propagator * | p, | |||
| PropCond | pc | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::subscribe | ( | Space * | home, | |
| Advisor * | a | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::cancel | ( | Space * | home, | |
| Advisor * | a | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::update | ( | Space * | home, | |
| bool | share, | |||
| ViewArray< View > & | a | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::move_fst | ( | int | i | ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::move_lst | ( | int | i | ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::move_fst | ( | int | i, | |
| Space * | home, | |||
| Propagator * | p, | |||
| PropCond | pc | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::move_lst | ( | int | i, | |
| Space * | home, | |||
| Propagator * | p, | |||
| PropCond | pc | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::move_fst | ( | int | i, | |
| Space * | home, | |||
| Advisor * | a | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::move_lst | ( | int | i, | |
| Space * | home, | |||
| Advisor * | a | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::drop_fst | ( | int | i | ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::drop_lst | ( | int | i | ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::drop_fst | ( | int | i, | |
| Space * | home, | |||
| Propagator * | p, | |||
| PropCond | pc | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::drop_lst | ( | int | i, | |
| Space * | home, | |||
| Propagator * | p, | |||
| PropCond | pc | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::drop_fst | ( | int | i, | |
| Space * | home, | |||
| Advisor * | a | |||
| ) | [inline] |
template<class View>
| void Gecode::ViewArray< View >::drop_lst | ( | int | i, | |
| Space * | home, | |||
| Advisor * | a | |||
| ) | [inline] |
template<class View>
| bool Gecode::ViewArray< View >::same | ( | void | ) | const [inline] |
template<class View>
| bool Gecode::ViewArray< View >::same | ( | const View & | y | ) | const [inline] |
template<class View>
| void Gecode::ViewArray< View >::unique | ( | void | ) | [inline] |
template<class View>
| bool Gecode::ViewArray< View >::shared | ( | void | ) | const [inline] |
template<class View>
| bool Gecode::ViewArray< View >::shared | ( | const View & | y | ) | const [inline] |
template<class View>
| Reflection::Arg * Gecode::ViewArray< View >::spec | ( | const Space * | home, | |
| Reflection::VarMap & | m | |||
| ) | const [inline] |
The documentation for this class was generated from the following file:
- gecode/kernel/array.icc (Revision: 6240)
