38namespace Gecode {
namespace Float {
namespace Arithmetic {
44 template<
class A,
class B,
class C>
49 template<
class A,
class B,
class C>
54 template<
class A,
class B,
class C>
60 template<
class A,
class B,
class C>
66 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>
112 template<
class A,
class B,
class C>
118 template<
class A,
class B,
class C>
128 template<
class A,
class B,
class C>
156 assert(
x.size() > 0);
164 for (
int i=
x.size(); i--; ) {
165 l = std::max(
l,
x[i].
min());
166 u = std::max(
u,
x[i].
max());
172 for (
int i=
x.size(); i--; )
207 assert(
x.size() > 0);
210 for (
int i =
x.size()-1; i--; ) {
211 maxmax = std::max(
x[i].
max(),maxmax);
212 maxmin = std::max(
x[i].
min(),maxmin);
219 for (
int i =
x.size(); i--; ) {
225 if (
x[i].
max() < maxmin) {
226 x.move_lst(i,home,
p,pc);
228 }
else if (!
x[i].assigned())
229 status &= ~MPS_ASSIGNED;
union Gecode::@603::NNF::@65 u
Union depending on nodetype t.
int p
Number of positive literals for node type.
Base-class for both propagators and branchers.
Propagator for bounds consistent max operator
static ExecStatus post(Home home, A x0, B x1, C x2)
Post propagator for .
virtual Actor * copy(Space &home)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Max(Space &home, Max &p)
Constructor for cloning p.
Propagator for bounds consistent min operator
Min(Space &home, Min &p)
Constructor for cloning p.
static ExecStatus post(Home home, A x0, B x1, C x2)
Post propagator for .
virtual Actor * copy(Space &home)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Bounds consistent n-ary maximum propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, ViewArray< View > &x, View y)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
NaryMax(Space &home, NaryMax &p)
Constructor for cloning p.
Binary bounds consistent equality propagator.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
Less or equal propagator.
Home class for posting propagators
Mixed ternary propagator.
Base-class for propagators.
bool assigned(void) const
Test whether view is assigned.
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_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.
double FloatNum
Floating point number base type.
MaxPropStatus
Status of propagation for nary max.
@ MPS_ASSIGNED
All views are assigned.
@ MPS_NEW_BOUND
Telling has found a new upper bound.
@ MPS_REMOVED
A view is removed.
ExecStatus prop_nary_max(Space &home, Propagator &p, ViewArray< View > &x, View y, PropCond pc)
const FloatNum min
Smallest allowed float value.
bool overlap(const FloatVal &x, const FloatVal &y)
const Gecode::ModEvent ME_FLOAT_FAILED
Domain operation has resulted in failure.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Gecode toplevel namespace
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
@ 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.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.