44 #ifndef __GECODE_INT_DISTINCT_HH__
45 #define __GECODE_INT_DISTINCT_HH__
57 namespace Gecode {
namespace Int {
namespace Distinct {
98 template<
class View,
bool complete>
bool mark(Space &home)
Mark edges in graph, return true if pruning is at all possible.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator for views x.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
DomCtrl< View > dc
Propagation controller.
int min_x
Minimum (approximation) of view in x.
ViewArray< View > x
Views on which to perform bounds-propagation.
Dom(Space &home, bool share, Dom< View > &p)
Constructor for cloning p.
ExecStatus init(Space &home, ViewArray< View > &x)
Initialize view-value graph for views x.
Val(Home home, ViewArray< View > &x)
Constructor for posting.
View-value graph for propagation.
TerDom(Space &home, bool share, TerDom< View > &p)
Constructor for cloning p.
Domain consistent distinct propagator.
ViewArray< View > x
Array of views.
Base-class for propagators.
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for views x.
ExecStatus prune(Space &home, bool &assigned)
Prune unmarked edges, assigned is true if a view got assigned.
Bnd(Home home, ViewArray< View > &x)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Base-class for both propagators and branchers.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Graph< View > g
Propagation is performed on a view-value graph.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
ExecStatus init(Space &home, ViewArray< View > &x)
Initialize graph.
int p
Number of positive literals for node type.
Graph(void)
Construct graph as not yet initialized.
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for view array x.
ViewArray< View > y
Views on which to perform value-propagation (subset of x)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
ModEventDelta med
A set of modification events (used during propagation)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
View-value graph base class.
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator for view array x.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
ExecStatus sync(Space &home)
Synchronize available view-value graph.
ExecStatus prop_val(Space &home, ViewArray< View > &x)
Eliminate singletons by naive value propagation.
Naive value distinct propagator.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Node * x
Pointer to corresponding Boolean expression node.
Ternary domain consistent distinct propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
DomCtrl(void)
Initialize with non-initialized view-value graph.
bool assigned(View x, int v)
Whether x is assigned to value v.
int max_x
Maximum (approximation) of view in x.
ExecStatus propagate(Space &home, bool &assigned)
Perform propagation, assigned is true if a view gets assigned.
Bounds consistent distinct propagator.
Gecode toplevel namespace
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
bool available(void)
Check whether a view-value graph is available.
ExecStatus prop_bnd(Space &home, ViewArray< View > &x, int *minsorted, int *maxsorted)
int ModEventDelta
Modification event deltas.
bool sync(Space &home)
Synchronize graph with new view domains.
virtual size_t dispose(Space &home)
Destructor.
Home class for posting propagators
Propagation controller for domain consistent distinct.