Gecode::VarImpView< Var > Class Template Reference
[Programming views for variables]
Base-class for variable implementation views. More...
#include <view.hpp>
List of all members.
Public Types | |
| typedef Var | VarType |
| The variable type corresponding to the view. | |
| typedef Var::VarImpType | VarImpType |
| The variable implementation type corresponding to the view. | |
Protected Member Functions | |
| VarImpView (void) | |
| Default constructor. | |
| VarImpView (VarImpType *y) | |
| Initialize with variable implementation y. | |
| void | varimp (VarImpType *y) |
| Set variable implementation to y. | |
Protected Attributes | |
| VarImpType * | x |
| Pointer to variable implementation. | |
Generic view information | |
|
| |
| static bool | varderived (void) |
| Return whether this view is derived from a VarImpView. | |
| VarImpType * | varimp (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. | |
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. | |
Delta information for advisors | |
|
| |
| static ModEvent | modevent (const Delta &d) |
| Return modification event. | |
Domain tests | |
|
| |
| bool | assigned (void) const |
| Test whether view is assigned. | |
Dependencies | |
|
| |
| void | subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=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 | reschedule (Space &home, Propagator &p, PropCond pc) |
| Re-schedule propagator p with propagation condition pc. | |
| void | subscribe (Space &home, Advisor &a, bool fail=false) |
| Subscribe advisor a to view. | |
| void | cancel (Space &home, Advisor &a, bool fail=false) |
| Cancel subscription of advisor a. | |
Cloning | |
|
| |
| void | update (Space &home, VarImpView< Var > &y) |
| Update this view to be a clone of view y. | |
Ordering | |
|
| |
| bool | operator< (const VarImpView &y) const |
| Whether this view comes before view y (arbitray order). | |
Detailed Description
template<class Var>
class Gecode::VarImpView< Var >
Base-class for variable implementation views.
Definition at line 133 of file view.hpp.
Member Typedef Documentation
| typedef Var Gecode::VarImpView< Var >::VarType |
The variable type corresponding to the view.
Definition at line 136 of file view.hpp.
| typedef Var::VarImpType Gecode::VarImpView< Var >::VarImpType |
The variable implementation type corresponding to the view.
Definition at line 138 of file view.hpp.
Constructor & Destructor Documentation
| Gecode::VarImpView< Var >::VarImpView | ( | void | ) | [inline, protected] |
Default constructor.
Definition at line 476 of file view.hpp.
| Gecode::VarImpView< Var >::VarImpView | ( | VarImpType * | y | ) | [inline, protected] |
Initialize with variable implementation y.
Definition at line 480 of file view.hpp.
Member Function Documentation
| void Gecode::VarImpView< Var >::varimp | ( | VarImpType * | y | ) | [inline, protected] |
Set variable implementation to y.
Definition at line 484 of file view.hpp.
| bool Gecode::VarImpView< Var >::varderived | ( | void | ) | [inline, static] |
Return whether this view is derived from a VarImpView.
Definition at line 489 of file view.hpp.
| Var::VarImpType * Gecode::VarImpView< Var >::varimp | ( | void | ) | const [inline] |
Return variable implementation of view.
Definition at line 494 of file view.hpp.
| unsigned int Gecode::VarImpView< Var >::degree | ( | void | ) | const [inline] |
Return degree (number of subscribed propagators and advisors).
Definition at line 499 of file view.hpp.
| double Gecode::VarImpView< Var >::afc | ( | void | ) | const [inline] |
Return accumulated failure count.
Definition at line 504 of file view.hpp.
| bool Gecode::VarImpView< Var >::assigned | ( | void | ) | const [inline] |
Test whether view is assigned.
Definition at line 516 of file view.hpp.
| void Gecode::VarImpView< Var >::schedule | ( | Space & | home, | |
| Propagator & | p, | |||
| ModEvent | me | |||
| ) | [inline, static] |
Schedule propagator p with modification event me.
Definition at line 547 of file view.hpp.
| ModEvent Gecode::VarImpView< Var >::me | ( | const ModEventDelta & | med | ) | [inline, static] |
Return modification event for view type in med.
Definition at line 552 of file view.hpp.
| ModEventDelta Gecode::VarImpView< Var >::med | ( | ModEvent | me | ) | [inline, static] |
Translate modification event me to modification event delta for view.
Reimplemented in Gecode::Float::FloatView, Gecode::Int::IntView, and Gecode::Int::BoolView.
Definition at line 557 of file view.hpp.
| void Gecode::VarImpView< Var >::subscribe | ( | Space & | home, | |
| Propagator & | p, | |||
| PropCond | pc, | |||
| bool | schedule = true | |||
| ) | [inline] |
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).
Definition at line 521 of file view.hpp.
| void Gecode::VarImpView< Var >::cancel | ( | Space & | home, | |
| Propagator & | p, | |||
| PropCond | pc | |||
| ) | [inline] |
Cancel subscription of propagator p with propagation condition pc to view.
Definition at line 527 of file view.hpp.
| void Gecode::VarImpView< Var >::reschedule | ( | Space & | home, | |
| Propagator & | p, | |||
| PropCond | pc | |||
| ) | [inline] |
Re-schedule propagator p with propagation condition pc.
Definition at line 532 of file view.hpp.
| void Gecode::VarImpView< Var >::subscribe | ( | Space & | home, | |
| Advisor & | a, | |||
| bool | fail = false | |||
| ) | [inline] |
Subscribe advisor a to view.
If fail is true, run the advisor also on failure. This feature is undocumented.
Definition at line 537 of file view.hpp.
| void Gecode::VarImpView< Var >::cancel | ( | Space & | home, | |
| Advisor & | a, | |||
| bool | fail = false | |||
| ) | [inline] |
Cancel subscription of advisor a.
Definition at line 542 of file view.hpp.
| ModEvent Gecode::VarImpView< Var >::modevent | ( | const Delta & | d | ) | [inline, static] |
Return modification event.
Reimplemented in Gecode::Set::SetView.
Definition at line 562 of file view.hpp.
| void Gecode::VarImpView< Var >::update | ( | Space & | home, | |
| VarImpView< Var > & | y | |||
| ) | [inline] |
Update this view to be a clone of view y.
Definition at line 567 of file view.hpp.
| bool Gecode::VarImpView< Var >::operator< | ( | const VarImpView< Var > & | y | ) | const |
Whether this view comes before view y (arbitray order).
Member Data Documentation
VarImpType* Gecode::VarImpView< Var >::x [protected] |
Pointer to variable implementation.
Definition at line 141 of file view.hpp.
The documentation for this class was generated from the following file:
- gecode/kernel/view.hpp
