Gecode::Variable< VTI, PC, MED > Class Template Reference
[Programming variables]
Inherits
Gecode::VarBase.
Inherited by Gecode::Int::IntVarImpBase, and Gecode::Set::SetVarImpBase.
List of all members.
Detailed Description
template<VarTypeId VTI, PropCond PC, class MED>
class Gecode::Variable< VTI, PC, MED >
Base-class for variable implementations.
Implements variable implementation for variable type identifier VTI and largest possible propagation condition PC.
Definition at line 182 of file core.icc.
|
Dependencies |
void | subscribe (Space *home, Propagator *p, PropCond pc, bool assigned, ModEvent me, bool process) |
| Subscribe propagator p with propagation condition pc to variable.
|
void | cancel (Space *home, Propagator *p, PropCond pc) |
| Cancel subscription of propagator p with propagation condition pc.
|
unsigned int | degree (void) const |
| Return degree (number of subscribed propagators).
|
void | notify (Space *home, ModEvent me) |
| Notify that variable implementation has been modified with modification event me.
|
void | notify (Space *home) |
| Notify that variable implementation has been assigned (only if variable has single modification event).
|
Processing modified variables |
bool | modified (void) const |
| Check whether variable has been modified during propagation.
|
Cloning variables |
| Variable (Space *home, bool share, Variable &x) |
| Constructor for cloning.
|
bool | copied (void) const |
| Is variable already copied.
|
Variable * | forward (void) const |
| Use forward pointer if variable already copied.
|
Processing modified variables |
Variable * | next (void) |
| Return next modified variable and reset (during processing).
|
ModEvent | modevent (void) const |
| Return current modification event of variable.
|
void | modevent (ModEvent me) |
| Set modification event to me.
|
void | process (Space *home, PropCond pc1, PropCond pc2, ModEvent me) |
| Process subscribed propagators.
|
void | process (Space *home) |
| Process subscribed propagators for assigned variable.
|
Propagator modification events |
static ModEvent | pme (const Propagator *p) |
| Return modification event for variable from propagator p.
|
static PropModEvent | pme (ModEvent me) |
| Translate modification event me into propagator modification event.
|
static ModEvent | combine (ModEvent me1, ModEvent me2) |
| Combine modifications events me1 and me2.
|
Memory management |
static void * | operator new (size_t, Space *) |
| Allocate memory from space.
|
static void | operator delete (void *, Space *) |
| Return memory to space.
|
static void | operator delete (void *) |
| Needed for exceptions.
|
Public Member Functions |
| Variable (Space *home) |
| Creation.
|
Constructor & Destructor Documentation
template<VarTypeId VTI, PropCond PC, class MED>
template<VarTypeId VTI, PropCond PC, class MED>
Constructor for cloning.
Definition at line 1275 of file core.icc.
Member Function Documentation
template<VarTypeId VTI, PropCond PC, class MED>
Subscribe propagator p with propagation condition pc to variable.
In case process is false, the propagator is just subscribed but not processed for execution (this must be used when creating subscriptions during propagation).
In case the variable is assigned (that is, assigned is true), the subscribing propagator is processed for execution. Otherwise, the propagator subscribes and is processed for execution with modification event me provided that pc is different from PC_GEN_ASSIGNED.
Definition at line 1478 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Cancel subscription of propagator p with propagation condition pc.
Definition at line 1539 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Return degree (number of subscribed propagators).
Definition at line 1210 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
template<VarTypeId VTI, PropCond PC, class MED>
Notify that variable implementation has been assigned (only if variable has single modification event).
Definition at line 1577 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Check whether variable has been modified during propagation.
Definition at line 1253 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Is variable already copied.
Definition at line 1269 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Use forward pointer if variable already copied.
Definition at line 1297 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Return modification event for variable from propagator p.
Definition at line 1308 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Translate modification event me into propagator modification event.
Definition at line 1314 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Combine modifications events me1 and me2.
Definition at line 1320 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Return next modified variable and reset (during processing).
Definition at line 1261 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Return current modification event of variable.
Definition at line 1218 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
template<VarTypeId VTI, PropCond PC, class MED>
Process subscribed propagators.
Definition at line 1649 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Process subscribed propagators for assigned variable.
Definition at line 1659 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Allocate memory from space.
Definition at line 1041 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
Return memory to space.
Definition at line 1038 of file core.icc.
template<VarTypeId VTI, PropCond PC, class MED>
void Gecode::Variable< VTI, PC, MED >::operator delete |
( |
void * |
|
) |
[inline, static] |
Needed for exceptions.
Definition at line 1035 of file core.icc.
The documentation for this class was generated from the following file: