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

Gecode::Int::Extensional::Incremental< View > Class Template Reference
[Integer propagators]

#include <extensional.hh>

Inherits Base< View, false >.

List of all members.


Detailed Description

template<class View>
class Gecode::Int::Extensional::Incremental< View >

Domain consistent extensional propagator.

This propagator implements an incremental propagation algorithm where supports are maintained explicitly.

Requires

Definition at line 279 of file extensional.hh.


Public Member Functions

virtual ExecStatus propagate (Space *home, ModEventDelta med)
 Perform propagation.
virtual PropCost cost (ModEventDelta med) const
 Cost function.
virtual Actorcopy (Space *home, bool share)
 Copy propagator during cloning.
size_t dispose (Space *home)
 Delete actor and return its size.
virtual Reflection::ActorSpec spec (const Space *home, Reflection::VarMap &m) const
 Specification for this propagator.
virtual ExecStatus advise (Space *home, Advisor *a, const Delta *d)
 Advise function.

Static Public Member Functions

static ExecStatus post (Space *home, ViewArray< View > &x, const TupleSet &t)
 Post propagator for views x.
static void post (Space *home, Reflection::VarMap &vars, const Reflection::ActorSpec &spec)
 Post propagator according to specification.
static Gecode::Support::Symbol ati (void)
 Mangled name of this propagator.

Protected Types

enum  WorkType { WT_FIND_SUPPORT, WT_REMOVE_VALUE }
 What is to be done. More...
typedef
::Gecode::Support::DynamicStack
< Work
WorkStack

Protected Member Functions

 Incremental (Space *home, bool share, Incremental< View > &p)
 Constructor for cloning p.
 Incremental (Space *home, ViewArray< View > &x, const TupleSet &t)
 Constructor for posting.
void find_support (Space *home, Domain dom, int var, int val)
void init_support (Space *home)
void add_support (Space *home, Tuple l)
void remove_support (Space *home, Tuple l, int var, int val)
SupportEntrysupport (int var, int val)

Protected Attributes

SupportEntry ** support_data
WorkStack work
int unassigned

Classes

class  SupportEntry
 Entry for storing support. More...
class  Work
 Description of work to be done. More...

Member Typedef Documentation

template<class View>
typedef ::Gecode::Support::DynamicStack<Work> Gecode::Int::Extensional::Incremental< View >::WorkStack [protected]

Definition at line 340 of file extensional.hh.


Member Enumeration Documentation

template<class View>
enum Gecode::Int::Extensional::Incremental::WorkType [protected]

What is to be done.

Enumerator:
WT_FIND_SUPPORT 
WT_REMOVE_VALUE 

Definition at line 324 of file extensional.hh.


Constructor & Destructor Documentation

template<class View>
Gecode::Int::Extensional::Incremental< View >::Incremental ( Space home,
bool  share,
Incremental< View > &  p 
) [inline, protected]

Constructor for cloning p.

Definition at line 134 of file incremental.icc.

template<class View>
Gecode::Int::Extensional::Incremental< View >::Incremental ( Space home,
ViewArray< View > &  x,
const TupleSet t 
) [inline, protected]

Constructor for posting.

Definition at line 92 of file incremental.icc.


Member Function Documentation

template<class View>
void Gecode::Int::Extensional::Incremental< View >::find_support ( Space home,
Domain  dom,
int  var,
int  val 
) [inline, protected]

Definition at line 284 of file incremental.icc.

template<class View>
void Gecode::Int::Extensional::Incremental< View >::init_support ( Space home  )  [inline, protected]

Definition at line 301 of file incremental.icc.

template<class View>
void Gecode::Int::Extensional::Incremental< View >::add_support ( Space home,
Tuple  l 
) [inline, protected]

Definition at line 247 of file incremental.icc.

template<class View>
void Gecode::Int::Extensional::Incremental< View >::remove_support ( Space home,
Tuple  l,
int  var,
int  val 
) [inline, protected]

Definition at line 258 of file incremental.icc.

template<class View>
Incremental< View >::SupportEntry * Gecode::Int::Extensional::Incremental< View >::support ( int  var,
int  val 
) [inline, protected]

Definition at line 313 of file incremental.icc.

template<class View>
ExecStatus Gecode::Int::Extensional::Incremental< View >::propagate ( Space home,
ModEventDelta  med 
) [inline, virtual]

Perform propagation.

Set up datastructures Bit-sets for amortized O(1) access to domains

Work loop

Implements Gecode::Propagator.

Definition at line 195 of file incremental.icc.

template<class View>
PropCost Gecode::Int::Extensional::Incremental< View >::cost ( ModEventDelta  med  )  const [inline, virtual]

Cost function.

If in stage for naive value propagation, the cost is PC_QUADRATIC_HI. Otherwise it is dynamic PC_CUBIC_HI.

Reimplemented from Gecode::Int::Extensional::Base< View, false >.

Definition at line 158 of file incremental.icc.

template<class View>
Actor * Gecode::Int::Extensional::Incremental< View >::copy ( Space home,
bool  share 
) [inline, virtual]

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 165 of file incremental.icc.

template<class View>
ExecStatus Gecode::Int::Extensional::Incremental< View >::post ( Space home,
ViewArray< View > &  x,
const TupleSet t 
) [inline, static]

Post propagator for views x.

Definition at line 127 of file incremental.icc.

template<class View>
size_t Gecode::Int::Extensional::Incremental< View >::dispose ( Space home  )  [inline, virtual]

Delete actor and return its size.

Reimplemented from Gecode::Int::Extensional::Base< View, false >.

Definition at line 370 of file incremental.icc.

template<class View>
Reflection::ActorSpec Gecode::Int::Extensional::Incremental< View >::spec ( const Space home,
Reflection::VarMap m 
) const [inline, virtual]

Specification for this propagator.

Reimplemented from Gecode::Actor.

Definition at line 177 of file incremental.icc.

template<class View>
void Gecode::Int::Extensional::Incremental< View >::post ( Space home,
Reflection::VarMap vars,
const Reflection::ActorSpec spec 
) [inline, static]

Post propagator according to specification.

Definition at line 185 of file incremental.icc.

template<class View>
Gecode::Support::Symbol Gecode::Int::Extensional::Incremental< View >::ati ( void   )  [inline, static]

Mangled name of this propagator.

Definition at line 171 of file incremental.icc.

template<class View>
ExecStatus Gecode::Int::Extensional::Incremental< View >::advise ( Space home,
Advisor a,
const Delta d 
) [inline, virtual]

Advise function.

The advisor is passed as argument a.

A propagator must specialize this advise function, if it uses advisors. The advise function must return an execution status as follows:

  • ES_FAILED: the advisor has detected failure
  • ES_FIX: the advisor's propagator (that is, this propagator) does not need to be run
  • ES_NOFIX: the advisor's propagator (that is, this propagator) must be run

Apart from the above values, an advisor can return the result from calling the function

  • ES_SUBSUMED_FIX: the advisor is subsumed, the advisor's propagator does not need to be run
  • ES_SUBSUMED_NOFIX: the advisor is subsumed, the advisor's propagator must be run For more details, see the function documentation.

The delta d describes how the variable has been changed by an operation on the advisor's variable. Typically, the delta information can only be utilized by either static or member functions of views as the actual delta information is both domain and view dependent.

Reimplemented from Gecode::Propagator.

Definition at line 324 of file incremental.icc.


Member Data Documentation

template<class View>
SupportEntry** Gecode::Int::Extensional::Incremental< View >::support_data [protected]

Definition at line 341 of file extensional.hh.

template<class View>
WorkStack Gecode::Int::Extensional::Incremental< View >::work [protected]

Definition at line 342 of file extensional.hh.

template<class View>
int Gecode::Int::Extensional::Incremental< View >::unassigned [protected]

Definition at line 343 of file extensional.hh.


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