Gecode::VarViewBase< VarImp > Class Template Reference
[Programming views for variables]
Base-class for variable views. More...
#include <view.hpp>
Protected Member Functions | |
| VarViewBase (void) | |
| Default constructor. | |
| VarViewBase (VarImp *x) | |
| Initialize with variable implementation x. | |
Protected Attributes | |
| VarImp * | varimp |
| Pointer to variable implementation. | |
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). | |
| double | afc (void) const |
| Return accumulated failure count (plus degree). | |
View-dependent propagator support | |
|
| |
| static void | schedule (Space &home, Propagator &p, ModEvent me) |
| Schedule propagator p with modification event me. | |
| static ModEvent | me (const 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 ViewA , class ViewB > | |
| bool | before (const ViewA &x, const ViewB &y) |
| Test whether view x comes before y (arbitrary order). | |
Detailed Description
template<class VarImp>
class Gecode::VarViewBase< VarImp >
Base-class for variable views.
Definition at line 66 of file view.hpp.
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] |
Return whether this view is derived from a VarViewBase.
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 >
| double Gecode::VarViewBase< VarImp >::afc | ( | 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 | ( | const 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 ViewA , class ViewB >
| bool before | ( | const ViewA & | x, | |
| const ViewB & | 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.hpp (Revision: 10046)
