Generated on Thu Jul 6 07:06:59 2006 for Gecode by doxygen 1.4.7

Gecode::Variable< VTI, PC > Class Template Reference
[Programming variables]

Inherits Gecode::VarBase.

List of all members.


Detailed Description

template<VarTypeId VTI, PropCond PC>
class Gecode::Variable< VTI, PC >

Base-class for variable implementations.

Implements variable implementation for variable type identifier VTI and largest possible propagation condition PC.

Definition at line 191 of file core.icc.

Dependencies

void subscribe (Space *home, Propagator *p, PropCond pc, bool assigned, ModEvent me)
 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 me.
void notify_unmodified (Space *home, ModEvent me)
 Notify that unmodified variable implementation has been modified with me.

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.
Variableforward (void) const
 Use forward pointer if variable already copied.

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>
Gecode::Variable< VTI, PC >::Variable ( Space home  )  [inline]

Creation.

Definition at line 1082 of file core.icc.

template<VarTypeId VTI, PropCond PC>
Gecode::Variable< VTI, PC >::Variable ( Space home,
bool  share,
Variable< VTI, PC > &  x 
)

Constructor for cloning.


Member Function Documentation

template<VarTypeId VTI, PropCond PC>
void Gecode::Variable< VTI, PC >::subscribe ( Space home,
Propagator p,
PropCond  pc,
bool  assigned,
ModEvent  me 
) [inline]

Subscribe propagator p with propagation condition pc to variable.

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 1356 of file core.icc.

template<VarTypeId VTI, PropCond PC>
void Gecode::Variable< VTI, PC >::cancel ( Space home,
Propagator p,
PropCond  pc 
) [inline]

Cancel subscription of propagator p with propagation condition pc.

Definition at line 1409 of file core.icc.

template<VarTypeId VTI, PropCond PC>
unsigned int Gecode::Variable< VTI, PC >::degree ( void   )  const [inline]

Return degree (number of subscribed propagators).

Definition at line 1091 of file core.icc.

template<VarTypeId VTI, PropCond PC>
void Gecode::Variable< VTI, PC >::notify ( Space home,
ModEvent  me 
) [inline]

Notify that variable implementation has been modified with me.

Definition at line 1423 of file core.icc.

template<VarTypeId VTI, PropCond PC>
void Gecode::Variable< VTI, PC >::notify_unmodified ( Space home,
ModEvent  me 
) [inline]

Notify that unmodified variable implementation has been modified with me.

Definition at line 1434 of file core.icc.

template<VarTypeId VTI, PropCond PC>
bool Gecode::Variable< VTI, PC >::modified ( void   )  const [inline]

Check whether variable has been modified during propagation.

Definition at line 1134 of file core.icc.

template<VarTypeId VTI, PropCond PC>
bool Gecode::Variable< VTI, PC >::copied ( void   )  const [inline]

Is variable already copied.

Definition at line 1150 of file core.icc.

template<VarTypeId VTI, PropCond PC>
Variable< VTI, PC > * Gecode::Variable< VTI, PC >::forward ( void   )  const [inline]

Use forward pointer if variable already copied.

Definition at line 1175 of file core.icc.

template<VarTypeId VTI, PropCond PC>
ModEvent Gecode::Variable< VTI, PC >::pme ( const Propagator p  )  [inline, static]

Return modification event for variable from propagator p.

Definition at line 1186 of file core.icc.

template<VarTypeId VTI, PropCond PC>
PropModEvent Gecode::Variable< VTI, PC >::pme ( ModEvent  me  )  [inline, static]

Translate modification event me into propagator modification event.

Definition at line 1192 of file core.icc.

template<VarTypeId VTI, PropCond PC>
ModEvent Gecode::Variable< VTI, PC >::combine ( ModEvent  me1,
ModEvent  me2 
) [inline, static]

Combine modifications events me1 and me2.

Definition at line 1198 of file core.icc.

template<VarTypeId VTI, PropCond PC>
void * Gecode::Variable< VTI, PC >::operator new ( size_t  ,
Space  
) [inline, static]

Allocate memory from space.

Definition at line 965 of file core.icc.

template<VarTypeId VTI, PropCond PC>
void Gecode::Variable< VTI, PC >::operator delete ( void *  ,
Space  
) [inline, static]

Return memory to space.

Definition at line 962 of file core.icc.

template<VarTypeId VTI, PropCond PC>
void Gecode::Variable< VTI, PC >::operator delete ( void *   )  [inline, static]

Needed for exceptions.

Definition at line 959 of file core.icc.


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