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>
116 bool operator ()(
void)
const;
118 void operator ++(
void);
149 bool empty(
void)
const;
225 namespace Gecode {
namespace Int {
namespace Extensional {
241 template<
class View,
bool subscribe = true>
255 void init_last(
Space& home, Tuple** source, Tuple* base);
257 Tuple last(
int i,
int n);
259 Tuple last_next(
int i,
int n);
261 void init_dom(
Space& home, Domain
dom);
265 Tuple find_support(Domain
dom,
int i,
int n);
280 namespace Gecode {
namespace Int {
namespace Extensional {
294 template<
class View,
bool shared>
332 namespace Gecode {
namespace Int {
namespace Extensional {
382 static void*
operator new(
size_t s,
Space& home);
384 static void operator delete(
void*
p);
386 static void operator delete(
void*
p,
Space& home);
417 static void*
operator new(
size_t s,
Space& home);
419 static void operator delete(
void*
p);
421 static void operator delete(
void*
p,
Space& home);
433 bool empty(
void)
const;
435 void push(
Space& home,
int i,
int n);
437 void pop(
Space& home,
int& i,
int& n);
454 void init_support(
Space& home);
481 class SupportAdvisor :
public Advisor {
489 SupportAdvisor(
Space& home,
bool share, SupportAdvisor&
a);
IndexRange i_ch
Index range with in-degree modifications.
TupleSet tupleSet
Definition of constraint.
Work w_remove
Work for removing values.
Description of work to be done.
bool valid(const FloatVal &n)
Return whether float n is a valid number.
void audit(void)
Perform consistency check on data structures.
Edge defined by in-state and out-state
Council< Index > c
The advisor council.
int n
Number of layers (and views)
Iterator for telling variable domains by scanning support.
IndexRange a_ch
Index range for any change (for compression)
StateIdx n_states
Number of states used by outgoing edges.
virtual ~Base(void)
Unused destructor (to avoid warnings)
unsigned int n_states
Total number of states.
int * Tuple
Type of a tuple.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
StateIdx i_state
Number of in-state.
Base-class for propagators.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high linear)
ActorLink * next(void) const
Routines for double-linked list.
Support information for a value
bool i_dec(int i, const Edge &e)
Decrement out degree for in state of edge e for layer i.
IndexRange o_ch
Index range with out-degree modifications.
Base-class for both propagators and branchers.
SupportEntry ** support_data
Support information.
State & o_state(int i, StateIdx os)
Return out state for layer i and state index os.
ValSize size
Number of supported values.
StateIdx o_state
Number of out-state.
Deterministic finite automaton (DFA)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Domain consistent extensional propagator.
Support * support
Supported values.
Range approximation of which positions have changed.
ViewArray< View > x
Variables.
Tuple ** last_data
Last tuple looked at Access real tuple-set.
ModEventDelta med
A set of modification events (used during propagation)
Entry for storing support.
Layer for a view in the layered graph
Support::BitSetBase * Domain
Degree n_edges
Number of supporting edges.
LayeredGraph(Space &home, bool share, LayeredGraph< View, Val, Degree, StateIdx > &p)
Constructor for cloning p.
struct Gecode::@519::NNF::@60::@62 a
For atomic nodes.
Layer * layers
The layers of the graph.
int i
Position of view in view array.
StateIdx max_states
Maximal number of states per layer.
ExecStatus post_lgp(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Select small types for the layered graph propagator.
Traits to for information about integer types.
int unassigned
Number of unassigned views.
bool empty(void) const
Test whether actor link is empty (points to itself)
Degree o_deg
The out-degree (number of outgoing edges) Initialize with zeroes.
State * states
States used by outgoing edges.
Domain consistent layered graph (regular) propagator.
Class represeting a set of tuples.
Work w_support
Work for finding support.
Domain consistent extensional propagator.
static ExecStatus post(Home home, const VarArgArray< Var > &x, const DFA &dfa)
Post propagator on views x and DFA dfa.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
Advisors for views (by position in array)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Support::BitSetBase BitSet
Base-class for freelist-managed objects.
Base for domain consistent extensional propagation
Edge * edges
Supporting edges in layered graph.
State & i_state(int i, StateIdx is)
Return in state for layer i and state index is.
Gecode toplevel namespace
Argument array for variables.
ExecStatus initialize(Space &home, const VarArgArray< Var > &x, const DFA &dfa)
Initialize layered graph.
States are described by number of incoming and outgoing edges.
Degree i_deg
The in-degree (number of incoming edges)
bool o_dec(int i, const Edge &e)
Decrement in degree for out state of edge e for layer i.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
unsigned int n_edges
Total number of edges.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Gecode::Support::IntTypeTraits< Val >::utype ValSize
Type for support size.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
int i
The position of the view in the view array.