Generated on Mon May 10 06:46:55 2010 for Gecode by doxygen 1.6.3

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

Base-class for variable views. More...

#include <view.hpp>

List of all members.

Protected Member Functions

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

Protected Attributes

VarImpvarimp
 Pointer to variable implementation.

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).
double afc (void) const
 Return accumulated failure count (plus degree).

View-dependent propagator support



static void schedule (Space &home, Propagator &p, ModEvent me)
 Schedule propagator p with modification event me.
static ModEvent me (const 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 VarImpA , class VarImpB >
bool same (const VarViewBase< VarImpA > &x, const VarViewBase< VarImpB > &y)
 Test whether views x and y are the same.
template<class ViewA , class ViewB >
bool before (const ViewA &x, const ViewB &y)
 Test whether view x comes before y (arbitrary order).

Detailed Description

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

Base-class for variable views.

Definition at line 66 of file view.hpp.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 278 of file view.hpp.

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

Initialize with variable implementation x.

Definition at line 282 of file view.hpp.


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 286 of file view.hpp.

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

Return variable implementation of view.

Definition at line 291 of file view.hpp.

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

Return degree (number of subscribed propagators and advisors).

Definition at line 296 of file view.hpp.

template<class VarImp >
double Gecode::VarViewBase< VarImp >::afc ( void   )  const [inline]

Return accumulated failure count (plus degree).

Definition at line 301 of file view.hpp.

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 327 of file view.hpp.

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

Return modification event for view type in med.

Definition at line 332 of file view.hpp.

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 337 of file view.hpp.

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

Combine modifications events me1 and me2.

Definition at line 342 of file view.hpp.

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 306 of file view.hpp.

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 312 of file view.hpp.

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

Subscribe advisor a to view.

Definition at line 317 of file view.hpp.

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

Cancel subscription of advisor a.

Definition at line 322 of file view.hpp.


Friends And Related Function Documentation

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

Test whether views x and y are the same.

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

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

Definition at line 353 of file view.hpp.


Member Data Documentation

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

Pointer to variable implementation.

Definition at line 69 of file view.hpp.


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