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--; ) {
168 if (x.
same(home,y)) {
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) {
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Propagator for bounds consistent max operator
Max(Space &home, bool share, Max &p)
Constructor for cloning p.
union Gecode::@579::NNF::@61 u
Union depending on nodetype t.
ViewArray< View > x
Array of views.
ExecStatus ES_SUBSUMED(Propagator &p)
const FloatNum max
Largest allowed float value.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool overlap(const FloatVal &x, const FloatVal &y)
Binary bounds consistent equality propagator.
int ModEvent
Type for modification events.
bool same(const Space &home) const
Test whether array has multiple occurence of the same view.
Base-class for propagators.
const Gecode::ModEvent ME_FLOAT_FAILED
Domain operation has resulted in failure.
Telling has found a new upper bound.
Propagation has computed fixpoint.
void unique(const Space &home)
Remove all duplicate views from array (changes element order)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
Base-class for both propagators and branchers.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool same(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether two views are the same.
int p
Number of positive literals for node type.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Execution has resulted in failure.
MaxPropStatus
Status of propagation for nary max.
Mixed ternary propagator.
int PropCond
Type for propagation conditions.
size_t size
The size of the propagator (used during subsumption)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, A x0, B x1, C x2)
Post propagator for .
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void move_lst(int i)
Move view from position size()-1 to position i (truncate array by one)
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Less or equal propagator.
static ExecStatus post(Home home, A x0, B x1, C x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
bool assigned(View x, int v)
Whether x is assigned to value v.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
NaryMax(Space &home, bool share, NaryMax &p)
Constructor for cloning p.
Post propagator for SetVar x
Propagation has not computed fixpoint.
ExecStatus prop_nary_max(Space &home, Propagator &p, ViewArray< View > &x, View y, PropCond pc)
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
Bounds consistent n-ary maximum propagator.
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Propagator for bounds consistent min operator
double FloatNum
Floating point number base type.
Min(Space &home, bool share, Min &p)
Constructor for cloning p.