40 namespace Gecode {
namespace Float {
namespace Arithmetic {
47 template<
class A,
class B,
class C>
52 template<
class A,
class B,
class C>
57 template<
class A,
class B,
class C>
61 :
MixTernaryPropagator<A,
PC_FLOAT_BND,B,
PC_FLOAT_BND,C,
PC_FLOAT_BND>(home,share,p,x0,x1,x2) {}
63 template<
class A,
class B,
class C>
66 return new (home)
Min<A,B,C>(home,share,*
this);
69 template<
class A,
class B,
class C>
76 template<
class A,
class B,
class C>
96 template<
class A,
class B,
class C>
101 template<
class A,
class B,
class C>
106 template<
class A,
class B,
class C>
110 :
MixTernaryPropagator<A,
PC_FLOAT_BND,B,
PC_FLOAT_BND,C,
PC_FLOAT_BND>(home,share,p,x0,x1,x2) {}
112 template<
class A,
class B,
class C>
115 return new (home)
Max<A,B,C>(home,share,*
this);
118 template<
class A,
class B,
class C>
125 template<
class A,
class B,
class C>
153 assert(x.
size() > 0);
161 for (
int i=x.
size();
i--; ) {
167 if (x.
same(home,y)) {
169 for (
int i=x.
size();
i--; )
204 assert(x.
size() > 0);
207 for (
int i = x.
size()-1;
i--; ) {
216 for (
int i = x.
size();
i--; ) {
222 if (x[
i].
max() < maxmin) {
249 template<
class A,
class B>
254 template<
class A,
class B>
259 template<
class A,
class B>
265 template<
class A,
class B>
274 template<
class A,
class B>
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
Propagator for bounds consistent max operator
Channel(Space &home, bool share, Channel &p)
Constructor for cloning p.
Max(Space &home, bool share, Max &p)
Constructor for cloning p.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
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.
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.
const int max
Largest allowed integer value.
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.
const int min
Smallest allowed integer value.
Base-class for both propagators and branchers.
Propagator for bounds consistent integer part operator
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
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.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
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)
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
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 .
Node * x
Pointer to corresponding Boolean expression node.
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.
static ExecStatus post(Home home, A x0, B x1)
Post propagator for .
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
bool same(const Space &home) const
Test whether array has multiple occurence of the same view.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
NaryMax(Space &home, bool share, NaryMax &p)
Constructor for cloning p.
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.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
Bounds consistent n-ary maximum propagator.
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.