Generated on Sat Feb 7 2015 02:01:51 for Gecode by doxygen 1.8.9.1
Gecode::Set::SetVarImpBase Class Reference

Base-class for Set-variable implementations. More...

#include <var-imp.hpp>

Public Member Functions

 SetVarImpBase (void)
 Constructor for creating static instance of variable. More...
 
 SetVarImpBase (Gecode::Space &home)
 Constructor for creating variable. More...
 
- Public Member Functions inherited from Gecode::VarImp< Gecode::Set::SetVarImpConf >
 VarImp (Space &home)
 Creation. More...
 
 VarImp (void)
 Creation of static instances. More...
 
VarImpnext (void) const
 Return next copied variable. More...
 
 VarImp (Space &home, bool share, VarImp &x)
 Constructor for cloning. More...
 
bool copied (void) const
 Is variable already copied. More...
 
VarImpforward (void) const
 Use forward pointer if variable already copied. More...
 
void cancel (Space &home, Propagator &p, PropCond pc, bool assigned)
 Cancel subscription of propagator p with propagation condition pc. More...
 
void cancel (Space &home, Advisor &a, bool assigned)
 Cancel subscription of advisor a. More...
 
void subscribe (Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me, bool schedule)
 Subscribe propagator p with propagation condition pc. More...
 
void subscribe (Space &home, Advisor &a, bool assigned)
 Subscribe advisor a to variable. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators and advisors) More...
 
double afc (const Space &home) const
 Return accumulated failure count (plus degree) More...
 
unsigned int bits (void) const
 Provide access to free bits. More...
 
unsigned int & bits (void)
 Provide access to free bits. More...
 

Protected Member Functions

 SetVarImpBase (Gecode::Space &home, bool share, SetVarImpBase &x)
 Constructor for cloning x. More...
 
- Protected Member Functions inherited from Gecode::VarImp< Gecode::Set::SetVarImpConf >
void cancel (Space &home)
 Cancel all subscriptions when variable implementation is assigned. More...
 
bool advise (Space &home, ModEvent me, Delta &d)
 Run advisors when variable implementation has been modified with modification event me and domain change d. More...
 
void schedule (Space &home, PropCond pc1, PropCond pc2, ModEvent me)
 Schedule subscribed propagators. More...
 

Dependencies

void subscribe (Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
 Subscribe propagator p with propagation condition pc. More...
 
void subscribe (Gecode::Space &home, Gecode::Advisor &a, bool assigned)
 Subscribe advisor a if assigned is false. More...
 
Gecode::ModEvent notify (Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
 Notify that variable implementation has been modified with modification event me and delta information d. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::VarImp< Gecode::Set::SetVarImpConf >
static void schedule (Space &home, Propagator &p, ModEvent me, bool force=false)
 Schedule propagator p with modification event me. More...
 
static ModEvent me (const ModEventDelta &med)
 Project modification event for this variable type from med. More...
 
static ModEventDelta med (ModEvent me)
 Translate modification event me into modification event delta. More...
 
static ModEvent me_combine (ModEvent me1, ModEvent me2)
 Combine modifications events me1 and me2. More...
 
static ModEvent modevent (const Delta &d)
 Return modification event. More...
 
static void * operator new (size_t, Space &)
 Allocate memory from space. More...
 
static void operator delete (void *, Space &)
 Return memory to space. More...
 
static void operator delete (void *)
 Needed for exceptions. More...
 
- Public Attributes inherited from Gecode::VarImp< Gecode::Set::SetVarImpConf >
ActorLink ** base
 Subscribed actors. More...
 
VarImp< Gecode::Set::SetVarImpConf > * fwd
 Forwarding pointer. More...
 
unsigned int idx [pc_max+1]
 Indices of subscribed actors. More...
 
VarImp< Gecode::Set::SetVarImpConf > * next
 During cloning, points to the next copied variable. More...
 

Detailed Description

Base-class for Set-variable implementations.

Definition at line 117 of file var-imp.hpp.

Constructor & Destructor Documentation

Gecode::Set::SetVarImpBase::SetVarImpBase ( Gecode::Space home,
bool  share,
SetVarImpBase x 
)
inlineprotected

Constructor for cloning x.

Definition at line 281 of file var-imp.hpp.

Gecode::Set::SetVarImpBase::SetVarImpBase ( void  )
inline

Constructor for creating static instance of variable.

Definition at line 274 of file var-imp.hpp.

Gecode::Set::SetVarImpBase::SetVarImpBase ( Gecode::Space home)
inline

Constructor for creating variable.

Definition at line 277 of file var-imp.hpp.

Member Function Documentation

void Gecode::Set::SetVarImpBase::subscribe ( Gecode::Space home,
Gecode::Propagator p,
Gecode::PropCond  pc,
bool  assigned,
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_SET_VAL.

Definition at line 285 of file var-imp.hpp.

void Gecode::Set::SetVarImpBase::subscribe ( Gecode::Space home,
Gecode::Advisor a,
bool  assigned 
)
inline

Subscribe advisor a if assigned is false.

Definition at line 289 of file var-imp.hpp.

Gecode::ModEvent Gecode::Set::SetVarImpBase::notify ( Gecode::Space home,
Gecode::ModEvent  me,
Gecode::Delta d 
)
inline

Notify that variable implementation has been modified with modification event me and delta information d.

Definition at line 294 of file var-imp.hpp.


The documentation for this class was generated from the following file: