Gecode::Int::Extensional::Incremental< View > Class Template Reference
[Integer propagators]
#include <extensional.hh>
Inherits Base< View, false >.
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
#include "gecode/int/extensional.hh"
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 Actor * | copy (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) |
SupportEntry * | support (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
typedef ::Gecode::Support::DynamicStack<Work> Gecode::Int::Extensional::Incremental< View >::WorkStack [protected] |
Definition at line 340 of file extensional.hh.
Member Enumeration Documentation
enum Gecode::Int::Extensional::Incremental::WorkType [protected] |
Constructor & Destructor Documentation
Gecode::Int::Extensional::Incremental< View >::Incremental | ( | Space * | home, | |
bool | share, | |||
Incremental< View > & | p | |||
) | [inline, protected] |
Gecode::Int::Extensional::Incremental< View >::Incremental | ( | Space * | home, | |
ViewArray< View > & | x, | |||
const TupleSet & | t | |||
) | [inline, protected] |
Member Function Documentation
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.
void Gecode::Int::Extensional::Incremental< View >::init_support | ( | Space * | home | ) | [inline, protected] |
Definition at line 301 of file incremental.icc.
void Gecode::Int::Extensional::Incremental< View >::add_support | ( | Space * | home, | |
Tuple | l | |||
) | [inline, protected] |
Definition at line 247 of file incremental.icc.
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.
Incremental< View >::SupportEntry * Gecode::Int::Extensional::Incremental< View >::support | ( | int | var, | |
int | val | |||
) | [inline, protected] |
Definition at line 313 of file incremental.icc.
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.
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.
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.
ExecStatus Gecode::Int::Extensional::Incremental< View >::post | ( | Space * | home, | |
ViewArray< View > & | x, | |||
const TupleSet & | t | |||
) | [inline, static] |
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.
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.
void Gecode::Int::Extensional::Incremental< View >::post | ( | Space * | home, | |
Reflection::VarMap & | vars, | |||
const Reflection::ActorSpec & | spec | |||
) | [inline, static] |
Gecode::Support::Symbol Gecode::Int::Extensional::Incremental< View >::ati | ( | void | ) | [inline, static] |
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
SupportEntry** Gecode::Int::Extensional::Incremental< View >::support_data [protected] |
Definition at line 341 of file extensional.hh.
WorkStack Gecode::Int::Extensional::Incremental< View >::work [protected] |
Definition at line 342 of file extensional.hh.
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:
- gecode/int/extensional.hh (Revision: 7285)
- gecode/int/extensional/incremental.icc (Revision: 6017)