Gecode::VarImp< VIC > Class Template Reference
[Programming variables]
Inherits Gecode::VarImpBase.
Detailed Description
template<class VIC>
class Gecode::VarImp< VIC >
Base-class for variable implementations.
Implements variable implementation for variable implementation configuration of type VIC.
Definition at line 284 of file core.icc.
Reflection | |
static const Support::Symbol | vti = VIC::vti |
Variable type identifier. | |
Dependencies | |
void | subscribe (Space *home, Propagator *p, PropCond pc, bool assigned, ModEvent me, bool schedule) |
Subscribe propagator p with propagation condition pc. | |
void | cancel (Space *home, Propagator *p, PropCond pc, bool assigned) |
Cancel subscription of propagator p with propagation condition pc. | |
void | subscribe (Space *home, Advisor *a, bool assigned) |
Subscribe advisor a to variable. | |
void | cancel (Space *home, Advisor *p, bool assigned) |
Cancel subscription of advisor a. | |
void | cancel (Space *home) |
Cancel all subscriptions when variable implementation is assigned. | |
unsigned int | degree (void) const |
Return degree (number of subscribed propagators and advisors). | |
bool | advise (Space *home, ModEvent me, Delta *d) |
Run advisors when variable implementation has been modified with modification event me and domain change d. | |
Cloning variables | |
VarImp (Space *home, bool share, VarImp &x) | |
Constructor for cloning. | |
bool | copied (void) const |
Is variable already copied. | |
VarImp * | forward (void) const |
Use forward pointer if variable already copied. | |
VarImp * | next (void) const |
Return next copied variable. | |
Variable implementation-dependent propagator support | |
static void | schedule (Space *home, Propagator *p, ModEvent me) |
Schedule propagator p with modification event me. | |
static ModEvent | me (ModEventDelta med) |
Project modification event for this variable type from med. | |
static ModEventDelta | med (ModEvent me) |
Translate modification event me into modification event delta. | |
static ModEvent | me_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 | |
VarImp (Space *home) | |
Creation. | |
VarImp (void) | |
Creation of static instances. | |
unsigned int | bits (void) const |
Provide access to free bits. | |
unsigned int & | bits (void) |
Provide access to free bits. | |
Protected Member Functions | |
void | schedule (Space *home, PropCond pc1, PropCond pc2, ModEvent me) |
Schedule subscribed propagators. |
Constructor & Destructor Documentation
template<class VIC>
Gecode::VarImp< VIC >::VarImp | ( | Space * | home | ) | [inline] |
template<class VIC>
Gecode::VarImp< VIC >::VarImp | ( | void | ) | [inline] |
template<class VIC>
Gecode::VarImp< VIC >::VarImp | ( | Space * | home, | |
bool | share, | |||
VarImp< VIC > & | x | |||
) | [inline] |
Member Function Documentation
template<class VIC>
void Gecode::VarImp< VIC >::subscribe | ( | Space * | home, | |
Propagator * | p, | |||
PropCond | pc, | |||
bool | assigned, | |||
ModEvent | me, | |||
bool | schedule | |||
) | [inline] |
Subscribe propagator p with propagation condition pc.
In case schedule is false, the propagator is just subscribed but not scheduled 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 scheduled for execution. Otherwise, the propagator subscribes and is scheduled for execution with modification event me provided that pc is different from PC_GEN_ASSIGNED.
template<class VIC>
void Gecode::VarImp< VIC >::cancel | ( | Space * | home, | |
Propagator * | p, | |||
PropCond | pc, | |||
bool | assigned | |||
) | [inline] |
template<class VIC>
void Gecode::VarImp< VIC >::subscribe | ( | Space * | home, | |
Advisor * | a, | |||
bool | assigned | |||
) | [inline] |
template<class VIC>
void Gecode::VarImp< VIC >::cancel | ( | Space * | home, | |
Advisor * | p, | |||
bool | assigned | |||
) | [inline] |
template<class VIC>
void Gecode::VarImp< VIC >::cancel | ( | Space * | home | ) | [inline] |
template<class VIC>
unsigned int Gecode::VarImp< VIC >::degree | ( | void | ) | const [inline] |
template<class VIC>
bool Gecode::VarImp< VIC >::advise | ( | Space * | home, | |
ModEvent | me, | |||
Delta * | d | |||
) | [inline] |
template<class VIC>
bool Gecode::VarImp< VIC >::copied | ( | void | ) | const [inline] |
template<class VIC>
VarImp< VIC > * Gecode::VarImp< VIC >::forward | ( | void | ) | const [inline] |
template<class VIC>
VarImp< VIC > * Gecode::VarImp< VIC >::next | ( | void | ) | const [inline] |
template<class VIC>
void Gecode::VarImp< VIC >::schedule | ( | Space * | home, | |
Propagator * | p, | |||
ModEvent | me | |||
) | [inline, static] |
template<class VIC>
ModEvent Gecode::VarImp< VIC >::me | ( | ModEventDelta | med | ) | [inline, static] |
template<class VIC>
ModEventDelta Gecode::VarImp< VIC >::med | ( | ModEvent | me | ) | [inline, static] |
template<class VIC>
ModEvent Gecode::VarImp< VIC >::me_combine | ( | ModEvent | me1, | |
ModEvent | me2 | |||
) | [inline, static] |
template<class VIC>
unsigned int Gecode::VarImp< VIC >::bits | ( | void | ) | const [inline] |
template<class VIC>
unsigned int & Gecode::VarImp< VIC >::bits | ( | void | ) | [inline] |
template<class VIC>
void Gecode::VarImp< VIC >::schedule | ( | Space * | home, | |
PropCond | pc1, | |||
PropCond | pc2, | |||
ModEvent | me | |||
) | [inline, protected] |
template<class VIC>
void * Gecode::VarImp< VIC >::operator new | ( | size_t | s, | |
Space * | home | |||
) | [inline, static] |
template<class VIC>
void Gecode::VarImp< VIC >::operator delete | ( | void * | , | |
Space * | ||||
) | [inline, static] |
template<class VIC>
void Gecode::VarImp< VIC >::operator delete | ( | void * | ) | [inline, static] |
Member Data Documentation
template<class VIC>
const Support::Symbol Gecode::VarImp< VIC >::vti = VIC::vti [inline, static] |
The documentation for this class was generated from the following file:
- gecode/kernel/core.icc (Revision: 7332)