Domain consistent layered graph (regular) propagator. More...
#include <extensional.hh>
Classes | |
class | Edge |
Edge defined by in-state and out-state More... | |
class | Index |
Advisors for views (by position in array) More... | |
class | IndexRange |
Range approximation of which positions have changed. More... | |
class | Layer |
Layer for a view in the layered graph More... | |
class | LayerValues |
Iterator for telling variable domains by scanning support. More... | |
class | State |
States are described by number of incoming and outgoing edges. More... | |
class | Support |
Support information for a value More... |
Public Member Functions | |
template<class Var> | |
LayeredGraph (Home home, const VarArgArray< Var > &x, const DFA &dfa) | |
Constructor for posting. | |
virtual Actor * | copy (Space &home) |
Copy propagator during cloning. | |
virtual PropCost | cost (const Space &home, const ModEventDelta &med) const |
Cost function (defined as high linear) | |
virtual void | reschedule (Space &home) |
Schedule function. | |
virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d) |
Give advice to propagator. | |
virtual ExecStatus | propagate (Space &home, const ModEventDelta &med) |
Perform propagation. | |
virtual size_t | dispose (Space &home) |
Delete propagator and return its size. | |
ModEventDelta | modeventdelta (void) const |
Return the modification event delta. | |
virtual void | advise (Space &home, Advisor &a) |
Run advisor a to be run on failure in failed space. | |
double | afc (void) const |
Return the accumlated failure count. | |
unsigned int | id (void) const |
Return propagator id. | |
PropagatorGroup | group (void) const |
Return group propagator belongs to. | |
void | group (PropagatorGroup g) |
Add propagator to group g. | |
bool | disabled (void) const |
Whether propagator is currently disabled. | |
virtual | ~Actor (void) |
To avoid warnings. |
Static Public Member Functions | |
template<class Var> | |
static ExecStatus | post (Home home, const VarArgArray< Var > &x, const DFA &dfa) |
Post propagator on views x and DFA dfa. | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. | |
static void | operator delete (void *p, Space &home) |
No-op for exceptions. | |
static void * | operator new (size_t s) |
Not used. | |
static void | operator delete (void *p) |
Not used. |
Protected Types | |
typedef Gecode::Support::IntTypeTraits< Val >::utype | ValSize |
Type for support size. |
Protected Member Functions | |
State & | i_state (int i, StateIdx is) |
Return in state for layer i and state index is. | |
State & | i_state (int i, const Edge &e) |
Return in state for layer i and in state of edge e. | |
bool | i_dec (int i, const Edge &e) |
Decrement out degree for in state of edge e for layer i. | |
State & | o_state (int i, StateIdx os) |
Return out state for layer i and state index os. | |
State & | o_state (int i, const Edge &e) |
Return state for layer i and out state of edge e. | |
bool | o_dec (int i, const Edge &e) |
Decrement in degree for out state of edge e for layer i. | |
void | audit (void) |
Perform consistency check on data structures. | |
template<class Var> | |
ExecStatus | initialize (Space &home, const VarArgArray< Var > &x, const DFA &dfa) |
Initialize layered graph. | |
LayeredGraph (Space &home, LayeredGraph< View, Val, Degree, StateIdx > &p) | |
Constructor for cloning p. | |
Protected Member Functions inherited from Gecode::Propagator | |
Propagator (Home home) | |
Constructor for posting. | |
Propagator (Space &home, Propagator &p) | |
Constructor for cloning p. | |
Propagator * | fwd (void) const |
Return forwarding pointer during copying. | |
Kernel::GPI::Info & | gpi (void) |
Provide access to global propagator information. |
Protected Attributes | |
Council< Index > | c |
The advisor council. | |
int | n |
Number of layers (and views) | |
Layer * | layers |
The layers of the graph. | |
StateIdx | max_states |
Maximal number of states per layer. | |
unsigned int | n_states |
Total number of states. | |
unsigned int | n_edges |
Total number of edges. | |
IndexRange | i_ch |
Index range with in-degree modifications. | |
IndexRange | o_ch |
Index range with out-degree modifications. | |
IndexRange | a_ch |
Index range for any change (for compression) |
Domain consistent layered graph (regular) propagator.
The algorithm for the regular propagator is based on: Gilles Pesant, A Regular Language Membership Constraint for Finite Sequences of Variables, CP 2004. Pages 482-495, LNCS 3258, Springer-Verlag, 2004.
The propagator is not capable of dealing with multiple occurences of the same view.
Requires
Definition at line 67 of file extensional.hh.
|
protected |
Type for support size.
Definition at line 91 of file extensional.hh.
|
inlineprotected |
Constructor for cloning p.
Definition at line 705 of file layered-graph.hpp.
|
inline |
Constructor for posting.
Definition at line 232 of file layered-graph.hpp.
|
inlineprotected |
Return in state for layer i and state index is.
Definition at line 85 of file layered-graph.hpp.
|
protected |
Return in state for layer i and in state of edge e.
|
inlineprotected |
Decrement out degree for in state of edge e for layer i.
Definition at line 96 of file layered-graph.hpp.
|
inlineprotected |
Return out state for layer i and state index os.
Definition at line 102 of file layered-graph.hpp.
|
protected |
Return state for layer i and out state of edge e.
|
inlineprotected |
Decrement in degree for out state of edge e for layer i.
Definition at line 113 of file layered-graph.hpp.
|
inlineprotected |
Perform consistency check on data structures.
Definition at line 242 of file layered-graph.hpp.
|
inlineprotected |
Initialize layered graph.
Definition at line 265 of file layered-graph.hpp.
|
virtual |
Copy propagator during cloning.
Implements Gecode::Actor.
Definition at line 745 of file layered-graph.hpp.
|
virtual |
Cost function (defined as high linear)
Implements Gecode::Propagator.
Definition at line 738 of file layered-graph.hpp.
|
virtual |
|
virtual |
Give advice to propagator.
Reimplemented from Gecode::Propagator.
Definition at line 437 of file layered-graph.hpp.
|
virtual |
Perform propagation.
Implements Gecode::Propagator.
Definition at line 597 of file layered-graph.hpp.
|
inlinevirtual |
Delete propagator and return its size.
Reimplemented from Gecode::Actor.
Definition at line 583 of file layered-graph.hpp.
|
static |
Post propagator on views x and DFA dfa.
Definition at line 682 of file layered-graph.hpp.
|
protected |
The advisor council.
Definition at line 154 of file extensional.hh.
|
protected |
Number of layers (and views)
Definition at line 156 of file extensional.hh.
|
protected |
The layers of the graph.
Definition at line 158 of file extensional.hh.
|
protected |
Maximal number of states per layer.
Definition at line 160 of file extensional.hh.
|
protected |
Total number of states.
Definition at line 162 of file extensional.hh.
|
protected |
Total number of edges.
Definition at line 164 of file extensional.hh.
|
protected |
Index range with in-degree modifications.
Definition at line 166 of file extensional.hh.
|
protected |
Index range with out-degree modifications.
Definition at line 168 of file extensional.hh.
|
protected |
Index range for any change (for compression)
Definition at line 170 of file extensional.hh.