Generated on Mon Aug 25 11:35:49 2008 for Gecode by doxygen 1.5.6

Gecode::VarViewBase< VarImp > Class Template Reference
[Programming views for variables]

Inherited by Gecode::CpltSet::CpltSetView, Gecode::Int::BoolView, Gecode::Int::IntView, and Gecode::Set::SetView.

List of all members.


Detailed Description

template<class VarImp>
class Gecode::VarViewBase< VarImp >

Base-class for variable views.

Definition at line 64 of file view.icc.


Generic view information

static bool varderived (void)
 Return whether this view is derived from a VarViewBase.
VarImpvar (void) const
 Return variable implementation of view.
unsigned int degree (void) const
 Return degree (number of subscribed propagators and advisors).

View-dependent propagator support

static void schedule (Space *home, Propagator *p, ModEvent me)
 Schedule propagator p with modification event me.
static ModEvent me (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.
static ModEvent me_combine (ModEvent me1, ModEvent me2)
 Combine modifications events me1 and me2.

Dependencies

void subscribe (Space *home, Propagator *p, PropCond pc, bool process=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 subscribe (Space *home, Advisor *a)
 Subscribe advisor a to view.
void cancel (Space *home, Advisor *a)
 Cancel subscription of advisor a.

View comparison

template<class VarImp>
bool same (const VarViewBase< VarImp > &x, const VarViewBase< VarImp > &y)
 Test whether views x and y are the same.
template<class VarImp>
bool before (const VarViewBase< VarImp > &x, const VarViewBase< VarImp > &y)
 Test whether view x comes before y (arbitrary order).

Protected Member Functions

 VarViewBase (void)
 Default constructor.
 VarViewBase (VarImp *x)
 Initialize with variable implementation x.

Protected Attributes

VarImpvarimp
 Pointer to variable implementation.

Constructor & Destructor Documentation

template<class VarImp>
Gecode::VarViewBase< VarImp >::VarViewBase ( void   )  [inline, protected]

Default constructor.

Definition at line 237 of file view.icc.

template<class VarImp>
Gecode::VarViewBase< VarImp >::VarViewBase ( VarImp x  )  [inline, protected]

Initialize with variable implementation x.

Definition at line 240 of file view.icc.


Member Function Documentation

template<class VarImp>
bool Gecode::VarViewBase< VarImp >::varderived ( void   )  [inline, static]

Return whether this view is derived from a VarViewBase.

Definition at line 244 of file view.icc.

template<class VarImp>
VarImp * Gecode::VarViewBase< VarImp >::var ( void   )  const [inline]

Return variable implementation of view.

Definition at line 249 of file view.icc.

template<class VarImp>
unsigned int Gecode::VarViewBase< VarImp >::degree ( void   )  const [inline]

Return degree (number of subscribed propagators and advisors).

Definition at line 254 of file view.icc.

template<class VarImp>
void Gecode::VarViewBase< VarImp >::schedule ( Space home,
Propagator p,
ModEvent  me 
) [inline, static]

Schedule propagator p with modification event me.

Definition at line 280 of file view.icc.

template<class VarImp>
ModEvent Gecode::VarViewBase< VarImp >::me ( ModEventDelta  med  )  [inline, static]

Return modification event for view type in med.

Definition at line 285 of file view.icc.

template<class VarImp>
ModEventDelta Gecode::VarViewBase< VarImp >::med ( ModEvent  me  )  [inline, static]

Translate modification event me to modification event delta for view.

Reimplemented in Gecode::Int::IntView, and Gecode::Int::BoolView.

Definition at line 290 of file view.icc.

template<class VarImp>
ModEvent Gecode::VarViewBase< VarImp >::me_combine ( ModEvent  me1,
ModEvent  me2 
) [inline, static]

Combine modifications events me1 and me2.

Definition at line 295 of file view.icc.

template<class VarImp>
void Gecode::VarViewBase< VarImp >::subscribe ( Space home,
Propagator p,
PropCond  pc,
bool  process = true 
) [inline]

Subscribe propagator p with propagation condition pc to view.

In case process is false, the propagator is just subscribed but not processed for execution (this must be used when creating subscriptions during propagation).

Definition at line 259 of file view.icc.

template<class VarImp>
void Gecode::VarViewBase< VarImp >::cancel ( Space home,
Propagator p,
PropCond  pc 
) [inline]

Cancel subscription of propagator p with propagation condition pc to view.

Definition at line 265 of file view.icc.

template<class VarImp>
void Gecode::VarViewBase< VarImp >::subscribe ( Space home,
Advisor a 
) [inline]

Subscribe advisor a to view.

Definition at line 270 of file view.icc.

template<class VarImp>
void Gecode::VarViewBase< VarImp >::cancel ( Space home,
Advisor a 
) [inline]

Cancel subscription of advisor a.

Definition at line 275 of file view.icc.


Friends And Related Function Documentation

template<class VarImp>
bool same ( const VarViewBase< VarImp > &  x,
const VarViewBase< VarImp > &  y 
) [related]

Test whether views x and y are the same.

Definition at line 301 of file view.icc.

template<class VarImp>
bool before ( const VarViewBase< VarImp > &  x,
const VarViewBase< VarImp > &  y 
) [related]

Test whether view x comes before y (arbitrary order).

Definition at line 306 of file view.icc.


Member Data Documentation

template<class VarImp>
VarImp* Gecode::VarViewBase< VarImp >::varimp [protected]

Pointer to variable implementation.

Definition at line 67 of file view.icc.


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