36 namespace Gecode {
namespace Int {
namespace Arithmetic {
101 View x0, View x1, View x2)
114 if ((x0.max() <= x1.min()) || (x0.max() < x2.min()))
116 if ((x1.max() <= x0.min()) || (x1.max() < x2.min()))
118 return x0.assigned() && x1.assigned() && x2.assigned() ?
135 assert(
x.size() > 0);
143 for (
int i=1;
i<
x.size();
i++) {
151 for (
int i=0;
i<
x.size();
i++)
186 assert(
x.size() > 0);
187 int maxmax =
x[0].max();
188 int maxmin =
x[0].min();
189 for (
int i=1;
i<
x.size();
i++) {
198 for (
int i=
x.size();
i--; ) {
204 if (
x[
i].
max() < maxmin) {
205 x.move_lst(
i,home,
p,pc);
263 View x0, View x1, View x2)
284 if ((x0.max() <= x1.min()) || (x0.max() < x2.min()))
286 if ((x1.max() <= x0.min()) || (x1.max() < x2.min()))
288 return x0.assigned() && x1.assigned() && x2.assigned() ?
319 assert(
x.size() > 0);
327 for (
int i=0;
i<
x.size();
i++) {
335 for (
int i=0;
i<
x.size();
i++)
379 for (
int i=0;
i<
x.size();
i++) {
384 for (
int i =
x.size();
i--; )
389 assert(
x.size() > 0);
int p
Number of positive literals for node type.
union Gecode::@602::NNF::@65 u
Union depending on nodetype t.
Node * x
Pointer to corresponding Boolean expression node.
Base-class for both propagators and branchers.
Home class for posting propagators
Bounds consistent ternary maximum propagator.
MaxBnd(Space &home, MaxBnd &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Domain consistent ternary maximum propagator.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
MaxDom(Space &home, MaxDom &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Bounds consistent n-ary maximum propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
NaryMaxBnd(Space &home, NaryMaxBnd &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Domain consistent n-ary maximum propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
NaryMaxDom(Space &home, NaryMaxDom &p)
Constructor for cloning p.
Binary bounds consistent equality propagator.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
Binary domain consistent equality propagator.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post domain consistent propagator .
Less or equal propagator.
static ExecStatus post(Home home, V0 x0, V1 x1)
Post propagator .
Range iterator for integer views.
Range iterator for union of iterators.
Range iterator for computing union (binary)
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Base-class for propagators.
bool assigned(void) const
Test whether view is assigned.
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
@ ES_NOFIX
Propagation has not computed fixpoint.
int PropCond
Type for propagation conditions.
int ModEvent
Type for modification events.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
const FloatNum max
Largest allowed float value.
const FloatNum min
Smallest allowed float value.
ExecStatus prop_nary_max_bnd(Space &home, Propagator &p, ViewArray< View > &x, View y, PropCond pc)
ExecStatus prop_max_bnd(Space &home, View x0, View x1, View x2)
MaxPropStatus
Status of propagation for nary max.
@ MPS_REMOVED
A view is removed.
@ MPS_NEW_BOUND
Telling has found a new upper bound.
@ MPS_ASSIGNED
All views are assigned.
bool assigned(View x, int v)
Whether x is assigned to value v.
RelTest rtest_nq_dom(VX x, VY y)
Test whether views x and y are different (use full domain information)
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
@ RT_TRUE
Relation does hold.
Gecode::IntArgs i({1, 2, 3, 4})