Base-class for constant views. More...
#include <view.hpp>
Public Types | |
typedef View::VarImpType | VarImpType |
The variable implementation type corresponding to the constant view. More... | |
typedef View::VarType | VarType |
The variable type corresponding to the constant view. More... | |
Generic view information | |
unsigned int | degree (void) const |
Return degree (number of subscribed propagators and advisors) More... | |
double | afc (void) const |
Return accumulated failure count. More... | |
VarImpType * | varimp (void) const |
Return dummy variable implementation of view. More... | |
static bool | varderived (void) |
Return whether this view is derived from a VarImpView. More... | |
Domain tests | |
bool | assigned (void) const |
Test whether view is assigned. More... | |
View-dependent propagator support | |
static void | schedule (Space &home, Propagator &p, ModEvent me) |
Schedule propagator p with modification event me. More... | |
static ModEvent | me (const ModEventDelta &med) |
Return modification event for view type in med. More... | |
static ModEventDelta | med (ModEvent me) |
Translate modification event me to modification event delta for view. More... | |
Dependencies | |
void | subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true) |
Subscribe propagator p with propagation condition pc to view. More... | |
void | cancel (Space &home, Propagator &p, PropCond pc) |
Cancel subscription of propagator p with propagation condition pc to view. More... | |
void | reschedule (Space &home, Propagator &p, PropCond pc) |
Re-schedule propagator p with propagation condition pc. More... | |
void | subscribe (Space &home, Advisor &a, bool fail=false) |
Subscribe advisor a to view. More... | |
void | cancel (Space &home, Advisor &a, bool fail=false) |
Cancel subscription of advisor a. More... | |
Delta information for advisors | |
static ModEvent | modevent (const Delta &d) |
Return modification event. More... | |
Cloning | |
void | update (Space &home, bool share, ConstView &y) |
Update this view to be a clone of view y. More... | |
Base-class for constant views.
typedef View::VarImpType Gecode::ConstView< View >::VarImpType |
typedef View::VarType Gecode::ConstView< View >::VarType |
unsigned int Gecode::ConstView< View >::degree | ( | void | ) | const |
Return degree (number of subscribed propagators and advisors)
double Gecode::ConstView< View >::afc | ( | void | ) | const |
Return accumulated failure count.
|
static |
Return whether this view is derived from a VarImpView.
VarImpType* Gecode::ConstView< View >::varimp | ( | void | ) | const |
Return dummy variable implementation of view.
bool Gecode::ConstView< View >::assigned | ( | void | ) | const |
Test whether view is assigned.
|
static |
Schedule propagator p with modification event me.
|
static |
Return modification event for view type in med.
|
static |
Translate modification event me to modification event delta for view.
void Gecode::ConstView< View >::subscribe | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc, | ||
bool | schedule = true |
||
) |
Subscribe propagator p with propagation condition pc to view.
In case schedule is false, the propagator is just subscribed but not scheduled for execution (this must be used when creating subscriptions during propagation).
void Gecode::ConstView< View >::cancel | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc | ||
) |
Cancel subscription of propagator p with propagation condition pc to view.
void Gecode::ConstView< View >::reschedule | ( | Space & | home, |
Propagator & | p, | ||
PropCond | pc | ||
) |
Re-schedule propagator p with propagation condition pc.
void Gecode::ConstView< View >::subscribe | ( | Space & | home, |
Advisor & | a, | ||
bool | fail = false |
||
) |
Subscribe advisor a to view.
If fail is true, run the advisor also on failure. This feature is undocumented.
void Gecode::ConstView< View >::cancel | ( | Space & | home, |
Advisor & | a, | ||
bool | fail = false |
||
) |
Cancel subscription of advisor a.
|
static |
Return modification event.
void Gecode::ConstView< View >::update | ( | Space & | home, |
bool | share, | ||
ConstView< View > & | y | ||
) |
Update this view to be a clone of view y.