Gecode::ViewArray< Int::Linear::NoView > Class Template Reference
Detailed Description
template<>
class Gecode::ViewArray< Int::Linear::NoView >
View array for no view (empty).
Definition at line 231 of file int-noview.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< Int::Linear::NoView > &) | |
Initialize. | |
ViewArray (Space *, const ViewArray< Int::Linear::NoView > &) | |
Initialize. | |
ViewArray (Space *, const Reflection::VarMap &, Reflection::Arg *) | |
Initialize. | |
const ViewArray < Int::Linear::NoView > & | operator= (const ViewArray< Int::Linear::NoView > &) |
Initialize. | |
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 | |
Int::Linear::NoView | operator[] (int i) |
Return view at position i. | |
Dependencies | |
void | subscribe (Space *, Propagator *p, PropCond pc, bool process=true) |
Subscribe propagator p with propagation condition pc to all views. | |
void | cancel (Space *home, Propagator *p, PropCond pc) |
Cancel subscription of propagator p with propagation condition pc to all views. | |
Cloning | |
void | update (Space *, bool share, ViewArray< Int::Linear::NoView > &a) |
Update array to be a clone of array a. | |
Reflection | |
Reflection::Arg * | spec (const Space *home, Reflection::VarMap &m) const |
Return specification for this array, using variable map m. | |
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, Propagator *p, PropCond pc) |
Move view from position 0 to position i (shift elements to the left). | |
void | move_lst (int i, Propagator *p, PropCond pc) |
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, Propagator *p, PropCond pc) |
Drop views from positions 0 to i-1 from array. | |
void | drop_lst (int i, Propagator *p, PropCond pc) |
Drop assigned views from positions i+1 to size()-1 from array. | |
View equality | |
bool | equal (void) const |
Test whether array has equal views. | |
bool | equal (const Int::Linear::NoView &y) const |
Test whether array contains view equal to y. | |
void | unique (void) |
Remove all duplicate views from array (changes element order). | |
View sharing | |
bool | shared (void) const |
Test whether array has shared views. | |
bool | shared (const Int::Linear::NoView &y) const |
Test whether array contains view shared with y. |
Constructor & Destructor Documentation
Gecode::ViewArray< Int::Linear::NoView >::ViewArray | ( | void | ) | [inline] |
Gecode::ViewArray< Int::Linear::NoView >::ViewArray | ( | Space * | home, | |
int | m | |||
) | [inline] |
Gecode::ViewArray< Int::Linear::NoView >::ViewArray | ( | const ViewArray< Int::Linear::NoView > & | ) | [inline] |
Gecode::ViewArray< Int::Linear::NoView >::ViewArray | ( | Space * | , | |
const ViewArray< Int::Linear::NoView > & | ||||
) | [inline] |
Gecode::ViewArray< Int::Linear::NoView >::ViewArray | ( | Space * | , | |
const Reflection::VarMap & | , | |||
Reflection::Arg * | ||||
) | [inline] |
Member Function Documentation
const ViewArray<Int::Linear::NoView>& Gecode::ViewArray< Int::Linear::NoView >::operator= | ( | const ViewArray< Int::Linear::NoView > & | ) | [inline] |
int Gecode::ViewArray< Int::Linear::NoView >::size | ( | void | ) | const [inline] |
void Gecode::ViewArray< Int::Linear::NoView >::size | ( | int | n | ) | [inline] |
Int::Linear::NoView Gecode::ViewArray< Int::Linear::NoView >::operator[] | ( | int | i | ) | [inline] |
void Gecode::ViewArray< Int::Linear::NoView >::subscribe | ( | Space * | , | |
Propagator * | p, | |||
PropCond | pc, | |||
bool | process = true | |||
) | [inline] |
Subscribe propagator p with propagation condition pc to all views.
Definition at line 270 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::cancel | ( | Space * | home, | |
Propagator * | p, | |||
PropCond | pc | |||
) | [inline] |
Cancel subscription of propagator p with propagation condition pc to all views.
Definition at line 274 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::update | ( | Space * | , | |
bool | share, | |||
ViewArray< Int::Linear::NoView > & | a | |||
) | [inline] |
Update array to be a clone of array a.
If share is true, sharing is retained for all shared data structures. Otherwise, for each of them an independent copy is created.
Definition at line 288 of file int-noview.icc.
Reflection::Arg* Gecode::ViewArray< Int::Linear::NoView >::spec | ( | const Space * | home, | |
Reflection::VarMap & | m | |||
) | const [inline] |
Return specification for this array, using variable map m.
Definition at line 296 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::move_fst | ( | int | i | ) | [inline] |
Move assigned view from position 0 to position i (shift elements to the left).
Definition at line 306 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::move_lst | ( | int | i | ) | [inline] |
Move assigned view from position size()-1
to position i (truncate array by one).
Definition at line 308 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::move_fst | ( | int | i, | |
Propagator * | p, | |||
PropCond | pc | |||
) | [inline] |
Move view from position 0 to position i (shift elements to the left).
Before moving, cancel subscription of propagator p with propagation condition pc to view at position i.
Definition at line 314 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::move_lst | ( | int | i, | |
Propagator * | p, | |||
PropCond | pc | |||
) | [inline] |
Move view from position size()-1
to position i (truncate array by one).
Before moving, cancel subscription of propagator p with propagation condition pc to view at position i.
Definition at line 322 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::drop_fst | ( | int | i | ) |
Drop assigned views from positions 0 to i-1 from array.
void Gecode::ViewArray< Int::Linear::NoView >::drop_lst | ( | int | i | ) |
Drop assigned views from positions i+1 to size()-1
from array.
void Gecode::ViewArray< Int::Linear::NoView >::drop_fst | ( | int | i, | |
Propagator * | p, | |||
PropCond | pc | |||
) | [inline] |
Drop views from positions 0 to i-1 from array.
Before moving, cancel subscription of propagator p with propagation condition pc to views at positions 0 to i-1.
Definition at line 338 of file int-noview.icc.
void Gecode::ViewArray< Int::Linear::NoView >::drop_lst | ( | int | i, | |
Propagator * | p, | |||
PropCond | pc | |||
) | [inline] |
Drop assigned views from positions i+1 to size()-1
from array.
Before moving, cancel subscription of propagator p with propagation condition pc to views at positions i+1 to size()-1
.
Definition at line 347 of file int-noview.icc.
bool Gecode::ViewArray< Int::Linear::NoView >::equal | ( | void | ) | const [inline] |
bool Gecode::ViewArray< Int::Linear::NoView >::equal | ( | const Int::Linear::NoView & | y | ) | const [inline] |
void Gecode::ViewArray< Int::Linear::NoView >::unique | ( | void | ) | [inline] |
Remove all duplicate views from array (changes element order).
Definition at line 362 of file int-noview.icc.
bool Gecode::ViewArray< Int::Linear::NoView >::shared | ( | void | ) | const [inline] |
bool Gecode::ViewArray< Int::Linear::NoView >::shared | ( | const Int::Linear::NoView & | y | ) | const [inline] |
The documentation for this class was generated from the following file:
- gecode/int/linear/int-noview.icc (Revision: 6017)