Gecode::VarViewBase< VarImp > Class Template Reference
[Programming views for variables]
Inherited by Gecode::CpltSet::CpltSetView, Gecode::Int::BoolView, Gecode::Int::IntView, and Gecode::Set::SetView.
Detailed Description
template<class VarImp>
class Gecode::VarViewBase< VarImp >
Base-class for variable views.
Definition at line 64 of file view.icc.
Generic view information | |
static bool | varderived (void) |
Return whether this view is derived from a VarViewBase. | |
VarImp * | var (void) const |
Return variable implementation of view. | |
unsigned int | degree (void) const |
Return degree (number of subscribed propagators and advisors). | |
View-dependent propagator support | |
static void | schedule (Space *home, Propagator *p, ModEvent me) |
Schedule propagator p with modification event me. | |
static ModEvent | me (ModEventDelta med) |
Return modification event for view type in med. | |
static ModEventDelta | med (ModEvent me) |
Translate modification event me to modification event delta for view. | |
static ModEvent | me_combine (ModEvent me1, ModEvent me2) |
Combine modifications events me1 and me2. | |
Dependencies | |
void | subscribe (Space *home, Propagator *p, PropCond pc, bool process=true) |
Subscribe propagator p with propagation condition pc to view. | |
void | cancel (Space *home, Propagator *p, PropCond pc) |
Cancel subscription of propagator p with propagation condition pc to view. | |
void | subscribe (Space *home, Advisor *a) |
Subscribe advisor a to view. | |
void | cancel (Space *home, Advisor *a) |
Cancel subscription of advisor a. | |
View comparison | |
template<class VarImp> | |
bool | same (const VarViewBase< VarImp > &x, const VarViewBase< VarImp > &y) |
Test whether views x and y are the same. | |
template<class VarImp> | |
bool | before (const VarViewBase< VarImp > &x, const VarViewBase< VarImp > &y) |
Test whether view x comes before y (arbitrary order). | |
Protected Member Functions | |
VarViewBase (void) | |
Default constructor. | |
VarViewBase (VarImp *x) | |
Initialize with variable implementation x. | |
Protected Attributes | |
VarImp * | varimp |
Pointer to variable implementation. |
Constructor & Destructor Documentation
template<class VarImp>
Gecode::VarViewBase< VarImp >::VarViewBase | ( | void | ) | [inline, protected] |
template<class VarImp>
Gecode::VarViewBase< VarImp >::VarViewBase | ( | VarImp * | x | ) | [inline, protected] |
Member Function Documentation
template<class VarImp>
bool Gecode::VarViewBase< VarImp >::varderived | ( | void | ) | [inline, static] |
template<class VarImp>
VarImp * Gecode::VarViewBase< VarImp >::var | ( | void | ) | const [inline] |
template<class VarImp>
unsigned int Gecode::VarViewBase< VarImp >::degree | ( | void | ) | const [inline] |
template<class VarImp>
void Gecode::VarViewBase< VarImp >::schedule | ( | Space * | home, | |
Propagator * | p, | |||
ModEvent | me | |||
) | [inline, static] |
template<class VarImp>
ModEvent Gecode::VarViewBase< VarImp >::me | ( | ModEventDelta | med | ) | [inline, static] |
template<class VarImp>
ModEventDelta Gecode::VarViewBase< VarImp >::med | ( | ModEvent | me | ) | [inline, static] |
Translate modification event me to modification event delta for view.
Reimplemented in Gecode::Int::IntView, and Gecode::Int::BoolView.
template<class VarImp>
ModEvent Gecode::VarViewBase< VarImp >::me_combine | ( | ModEvent | me1, | |
ModEvent | me2 | |||
) | [inline, static] |
template<class VarImp>
void Gecode::VarViewBase< VarImp >::subscribe | ( | Space * | home, | |
Propagator * | p, | |||
PropCond | pc, | |||
bool | process = true | |||
) | [inline] |
template<class VarImp>
void Gecode::VarViewBase< VarImp >::cancel | ( | Space * | home, | |
Propagator * | p, | |||
PropCond | pc | |||
) | [inline] |
template<class VarImp>
void Gecode::VarViewBase< VarImp >::subscribe | ( | Space * | home, | |
Advisor * | a | |||
) | [inline] |
template<class VarImp>
void Gecode::VarViewBase< VarImp >::cancel | ( | Space * | home, | |
Advisor * | a | |||
) | [inline] |
Friends And Related Function Documentation
template<class VarImp>
bool same | ( | const VarViewBase< VarImp > & | x, | |
const VarViewBase< VarImp > & | y | |||
) | [related] |
template<class VarImp>
bool before | ( | const VarViewBase< VarImp > & | x, | |
const VarViewBase< VarImp > & | y | |||
) | [related] |
Member Data Documentation
template<class VarImp>
VarImp* Gecode::VarViewBase< VarImp >::varimp [protected] |
The documentation for this class was generated from the following file:
- gecode/kernel/view.icc (Revision: 7290)