Go to the documentation of this file.
42 namespace Gecode {
namespace Float {
namespace Arithmetic {
48 template<
class A,
class B,
class C>
53 template<
class A,
class B,
class C>
58 template<
class A,
class B,
class C>
62 :
MixTernaryPropagator<A,
PC_FLOAT_BND,B,
PC_FLOAT_BND,C,
PC_FLOAT_BND>(home,share,
p,x0,x1,x2) {}
64 template<
class A,
class B,
class C>
67 return new (home)
Min<A,B,C>(home,share,*
this);
70 template<
class A,
class B,
class C>
77 template<
class A,
class B,
class C>
97 template<
class A,
class B,
class C>
102 template<
class A,
class B,
class C>
107 template<
class A,
class B,
class C>
111 :
MixTernaryPropagator<A,
PC_FLOAT_BND,B,
PC_FLOAT_BND,C,
PC_FLOAT_BND>(home,share,
p,x0,x1,x2) {}
113 template<
class A,
class B,
class C>
116 return new (home)
Max<A,B,C>(home,share,*
this);
119 template<
class A,
class B,
class C>
126 template<
class A,
class B,
class C>
154 assert(
x.size() > 0);
162 for (
int i=
x.size();
i--; ) {
170 for (
int i=
x.size();
i--; )
205 assert(
x.size() > 0);
208 for (
int i =
x.size()-1;
i--; ) {
217 for (
int i =
x.size();
i--; ) {
223 if (
x[
i].
max() < maxmin) {
224 x.move_lst(
i,home,
p,pc);
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator for bounds consistent max operator
Propagator for bounds consistent min operator
const Gecode::ModEvent ME_FLOAT_FAILED
Domain operation has resulted in failure.
bool assigned(View x, int v)
Whether x is assigned to value v.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode::IntArgs i(4, 1, 2, 3, 4)
bool same(const Item &i, const Item &j)
Whether two items are the same.
bool same(const VarImpVar< VarImp > &y) const
Test whether variable is the same as y.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const FloatNum min
Smallest allowed float value.
Base-class for both propagators and branchers.
bool assigned(void) const
Test whether view is assigned.
union Gecode::@579::NNF::@61 u
Union depending on nodetype t.
Mixed ternary propagator.
Gecode toplevel namespace
Base-class for propagators.
Binary bounds consistent equality propagator.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
NaryMax(Space &home, bool share, NaryMax &p)
Constructor for cloning p.
Home class for posting propagators
ExecStatus prop_nary_max(Space &home, Propagator &p, ViewArray< View > &x, View y, PropCond pc)
double FloatNum
Floating point number base type.
Bounds consistent n-ary maximum propagator.
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
@ MPS_ASSIGNED
All views are assigned.
int ModEvent
Type for modification events.
int PropCond
Type for propagation conditions.
bool overlap(const FloatVal &x, const FloatVal &y)
static ExecStatus post(Home home, A x0, B x1, C x2)
Post propagator for .
@ MPS_NEW_BOUND
Telling has found a new upper bound.
@ ES_FIX
Propagation has computed fixpoint.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Min(Space &home, bool share, Min &p)
Constructor for cloning p.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Less or equal propagator.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
@ ES_FAILED
Execution has resulted in failure.
static ExecStatus post(Home home, A x0, B x1, C x2)
Post propagator for .
int ModEventDelta
Modification event deltas.
@ ES_NOFIX
Propagation has not computed fixpoint.
Max(Space &home, bool share, Max &p)
Constructor for cloning p.
@ MPS_REMOVED
A view is removed.
@ ES_OK
Execution is okay.
MaxPropStatus
Status of propagation for nary max.
int p
Number of positive literals for node type.
const FloatNum max
Largest allowed float value.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.