Go to the documentation of this file.
40 #ifndef __GECODE_INT_EXTENSIONAL_HH__
41 #define __GECODE_INT_EXTENSIONAL_HH__
52 namespace Gecode {
namespace Int {
namespace Extensional {
68 template<
class View,
class Val,
class Degree,
class StateIdx>
149 bool empty(
void)
const;
227 namespace Gecode {
namespace Int {
namespace Extensional {
243 template<
class View,
bool subscribe = true>
282 namespace Gecode {
namespace Int {
namespace Extensional {
296 template<
class View,
bool shared>
334 namespace Gecode {
namespace Int {
namespace Extensional {
384 static void*
operator new(
size_t s,
Space& home);
386 static void operator delete(
void*
p);
388 static void operator delete(
void*
p,
Space& home);
419 static void*
operator new(
size_t s,
Space& home);
421 static void operator delete(
void*
p);
423 static void operator delete(
void*
p,
Space& home);
435 bool empty(
void)
const;
485 class SupportAdvisor :
public Advisor {
493 SupportAdvisor(
Space& home,
bool share, SupportAdvisor&
a);
void audit(void)
Perform consistency check on data structures.
Tuple last_next(int i, int n)
Find last support for view at position i and value n.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Degree o_deg
The out-degree (number of outgoing edges) Initialize with zeroes.
Post propagator for SetVar x
Description of work to be done.
void lshift(int n)
Shift index range by n elements to the left.
Index(Space &home, Propagator &p, Council< Index > &c, int i)
Create index advisor.
void find_support(Space &home, Domain dom, int i, int n)
Find a next support for view at position i and value n.
Advisors for views (by position in array)
virtual void reschedule(Space &home)
Schedule function.
Support::BitSetBase BitSet
IndexRange a_ch
Index range for any change (for compression)
bool i_dec(int i, const Edge &e)
Decrement out degree for in state of edge e for layer i.
int val(void) const
Return supported value.
WorkEntry(int i, int n, WorkEntry *ne)
Initialize with position i, value n, and next entry ne.
size_t dispose(Space &home)
Delete propagator and return its size.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
int fst(void) const
Return first position.
Council< Index > c
The advisor council.
static ExecStatus post(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Post propagator on views x and DFA dfa.
void pop(Space &home, int &i, int &n)
Pop current top entry and set position i and value n.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
WorkEntry * next(void) const
Return next work entry.
SupportEntry ** support_data
Support information.
void remove_support(Space &home, Tuple l, int i, int n)
Remove support for view at position i and value n.
Work w_support
Work for finding support.
ExecStatus post_lgp(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Select small types for the layered graph propagator.
bool valid(Tuple t, Domain dom)
Check wether tuple is valid for domain.
void dispose(Space &home, SupportEntry *l)
Free memory for all elements between this and l (inclusive)
Edge * edges
Supporting edges in layered graph.
Base-class for both propagators and branchers.
Tuple last(int i, int n)
Find last support for view at position i and value n.
StateIdx n_states
Number of states used by outgoing edges.
State & i_state(int i, StateIdx is)
Return in state for layer i and state index is.
Layer * layers
The layers of the graph.
void init(const Layer &l)
Initialize for support of layer l.
Base for domain consistent extensional propagation
Range approximation of which positions have changed.
IndexRange i_ch
Index range with in-degree modifications.
SupportEntry * next(void) const
Return next support entry.
Gecode toplevel namespace
Domain consistent extensional propagator.
Support information for a value
Domain consistent extensional propagator.
SupportEntry(Tuple t)
Initialize with Tuple t.
Base-class for propagators.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Entry for storing support.
LayerValues(void)
Default constructor.
Base(Space &home, bool share, Base< View, subscribe > &p)
Constructor for cloning p.
Support::BitSetBase * Domain
Domain consistent layered graph (regular) propagator.
int lst(void) const
Return last position.
Generic domain change information to be supplied to advisors.
void init_dom(Space &home, Domain dom)
Initialize domain information.
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &t)
Post propagator for views x.
Home class for posting propagators
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
void init_support(Space &home)
Initialize support.
int n
Number of layers (and views)
Gecode::Support::IntTypeTraits< Val >::utype ValSize
Type for support size.
ValSize size
Number of supported values.
Iterator for telling variable domains by scanning support.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Tuple find_support(Domain dom, int i, int n)
Find support for view at position i and value n.
int unassigned
Number of unassigned views.
void operator++(void)
Move to next supported value.
int * Tuple
Type of a tuple.
void reset(void)
Reset range to be empty.
ModEventDelta med
A set of modification events (used during propagation)
Support * support
Supported values.
unsigned int n_states
Total number of states.
Work(void)
Initialize as empty.
StateIdx o_state
Number of out-state.
const double base
Base for geometric restart sequence.
LayeredGraph(Space &home, bool share, LayeredGraph< View, Val, Degree, StateIdx > &p)
Constructor for cloning p.
static ExecStatus post(Home home, ViewArray< View > &x, const TupleSet &t)
Post propagator for views x.
Degree i_deg
The in-degree (number of incoming edges)
Class represeting a set of tuples.
IndexRange o_ch
Index range with out-degree modifications.
int i
The position of the view in the view array.
ViewArray< View > x
Variables.
Base-class for freelist-managed objects.
bool empty(void) const
Check whether work stack is empty.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high linear)
StateIdx i_state
Number of in-state.
StateIdx max_states
Maximal number of states per layer.
Deterministic finite automaton (DFA)
Traits to for information about integer types.
bool empty(void) const
Test whether range is empty.
States are described by number of incoming and outgoing edges.
TupleSet::TupleSetI * ts(void)
void init_last(Space &home, Tuple **source, Tuple *base)
Initialize last support.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
State * states
States used by outgoing edges.
Basic(Space &home, bool share, Basic< View, shared > &p)
Constructor for cloning p.
SupportEntry ** nextRef(void)
Return reference to field for next support entry.
Layer for a view in the layered graph
virtual void reschedule(Space &home)
Schedule function.
Work w_remove
Work for removing values.
ExecStatus initialize(Space &home, const VarArgArray< Var > &x, const DFA &dfa)
Initialize layered graph.
unsigned int n_edges
Total number of edges.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
TupleSet tupleSet
Definition of constraint.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
IndexRange(void)
Initialize range as empty.
Degree n_edges
Number of supporting edges.
Tuple ** last_data
Last tuple looked at Access real tuple-set.
void push(Space &home, int i, int n)
Push new work entry for position i and value n.
Gecode::FloatVal c(-8, 8)
State & o_state(int i, StateIdx os)
Return out state for layer i and state index os.
Edge defined by in-state and out-state
int n
Number of negative literals for node type.
Argument array for variables.
void add_support(Space &home, Tuple l)
Add support.
int ModEventDelta
Modification event deltas.
bool o_dec(int i, const Edge &e)
Decrement in degree for out state of edge e for layer i.
void dispose(Space &home)
Free memory for this element.
virtual void reschedule(Space &home)
Schedule function.
int p
Number of positive literals for node type.
bool operator()(void) const
Test whether more values supported.
int i
Position of view in view array.
void add(int i)
Add index i to range.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high quadratic)
SupportEntry * support(int i, int n)
Creat support entry for view at position i and value n.
Incremental(Space &home, bool share, Incremental< View > &p)
Constructor for cloning p.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.