Generated on Tue Jan 28 2020 00:00:00 for Gecode by doxygen 1.8.17
Gecode::DerivedView< View > Class Template Reference

Base-class for derived views. More...

#include <view.hpp>

Public Types

typedef View::VarImpType VarImpType
 The variable implementation type belonging to the View. More...
 
typedef View::VarType VarType
 The variable type belonging to the View. More...
 

Public Member Functions

 DerivedView (const View &y)
 Initialize with view y. More...
 

Protected Member Functions

 DerivedView (void)
 Default constructor. More...
 

Protected Attributes

View x
 View from which this view is derived. More...
 

Generic view information

VarImpTypevarimp (void) const
 Return variable implementation of view. More...
 
View base (void) const
 Return view from which this view is derived. More...
 
unsigned int degree (void) const
 Return degree (number of subscribed propagators) More...
 
double afc (void) const
 Return accumulated failure count. More...
 
static bool varderived (void)
 Return whether this view is derived from a VarImpView. More...
 

Domain tests

bool assigned (void) const
 Test whether view is assigned. More...
 

View-dependent propagator support

static void schedule (Space &home, Propagator &p, ModEvent me)
 Schedule propagator p with modification event me. More...
 
static ModEvent me (const ModEventDelta &med)
 Return modification event for view type in med. More...
 
static ModEventDelta med (ModEvent)
 Translate modification event me to modification event delta for view. More...
 

Dependencies

void subscribe (Space &home, Propagator &p, PropCond pc, bool schedule=true)
 Subscribe propagator p with propagation condition pc to view. More...
 
void cancel (Space &home, Propagator &p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc to view. More...
 
void reschedule (Space &home, Propagator &p, PropCond pc)
 Re-schedule propagator p with propagation condition pc. More...
 
void subscribe (Space &home, Advisor &a, bool fail=false)
 Subscribe advisor a to view. More...
 
void cancel (Space &home, Advisor &a, bool fail=false)
 Cancel subscription of advisor a. More...
 

Delta information for advisors

static ModEvent modevent (const Delta &d)
 Return modification event. More...
 

Cloning

void update (Space &home, bool share, DerivedView< View > &y)
 Update this view to be a clone of view y. More...
 

Detailed Description

template<class View>
class Gecode::DerivedView< View >

Base-class for derived views.

Definition at line 222 of file view.hpp.

Member Typedef Documentation

◆ VarImpType

template<class View >
typedef View::VarImpType Gecode::DerivedView< View >::VarImpType

The variable implementation type belonging to the View.

Definition at line 225 of file view.hpp.

◆ VarType

template<class View >
typedef View::VarType Gecode::DerivedView< View >::VarType

The variable type belonging to the View.

Definition at line 227 of file view.hpp.

Constructor & Destructor Documentation

◆ DerivedView() [1/2]

template<class View >
Gecode::DerivedView< View >::DerivedView ( void  )
protected

Default constructor.

◆ DerivedView() [2/2]

template<class View >
Gecode::DerivedView< View >::DerivedView ( const View &  y)

Initialize with view y.

Member Function Documentation

◆ varderived()

template<class View >
static bool Gecode::DerivedView< View >::varderived ( void  )
static

Return whether this view is derived from a VarImpView.

◆ varimp()

template<class View >
VarImpType* Gecode::DerivedView< View >::varimp ( void  ) const

Return variable implementation of view.

◆ base()

template<class View >
View Gecode::DerivedView< View >::base ( void  ) const

Return view from which this view is derived.

◆ degree()

template<class View >
unsigned int Gecode::DerivedView< View >::degree ( void  ) const

Return degree (number of subscribed propagators)

◆ afc()

template<class View >
double Gecode::DerivedView< View >::afc ( void  ) const

Return accumulated failure count.

◆ assigned()

template<class View >
bool Gecode::DerivedView< View >::assigned ( void  ) const

Test whether view is assigned.

◆ schedule()

template<class View >
static void Gecode::DerivedView< View >::schedule ( Space home,
Propagator p,
ModEvent  me 
)
static

Schedule propagator p with modification event me.

◆ me()

template<class View >
static ModEvent Gecode::DerivedView< View >::me ( const ModEventDelta med)
static

Return modification event for view type in med.

◆ med()

template<class View >
static ModEventDelta Gecode::DerivedView< View >::med ( ModEvent  )
static

Translate modification event me to modification event delta for view.

◆ subscribe() [1/2]

template<class View >
void Gecode::DerivedView< View >::subscribe ( Space home,
Propagator p,
PropCond  pc,
bool  schedule = true 
)

Subscribe propagator p with propagation condition pc to view.

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

◆ cancel() [1/2]

template<class View >
void Gecode::DerivedView< View >::cancel ( Space home,
Propagator p,
PropCond  pc 
)

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

◆ reschedule()

template<class View >
void Gecode::DerivedView< View >::reschedule ( Space home,
Propagator p,
PropCond  pc 
)

Re-schedule propagator p with propagation condition pc.

◆ subscribe() [2/2]

template<class View >
void Gecode::DerivedView< View >::subscribe ( Space home,
Advisor a,
bool  fail = false 
)

Subscribe advisor a to view.

If fail is true, run the advisor also on failure. This feature is undocumented.

◆ cancel() [2/2]

template<class View >
void Gecode::DerivedView< View >::cancel ( Space home,
Advisor a,
bool  fail = false 
)

Cancel subscription of advisor a.

◆ modevent()

template<class View >
static ModEvent Gecode::DerivedView< View >::modevent ( const Delta d)
static

Return modification event.

◆ update()

template<class View >
void Gecode::DerivedView< View >::update ( Space home,
bool  share,
DerivedView< View > &  y 
)

Update this view to be a clone of view y.

Member Data Documentation

◆ x

template<class View >
View Gecode::DerivedView< View >::x
protected

View from which this view is derived.

Definition at line 230 of file view.hpp.


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