43 using namespace Float;
47 for (
int i = x.
size(); i--; ) {
48 t[i].
a=1.0; t[i].
x=x[i];
56 using namespace Float;
60 for (
int i = x.
size(); i--; ) {
61 t[i].
a=1.0; t[i].
x=x[i];
70 using namespace Float;
76 for (
int i = x.
size(); i--; ) {
77 t[i].
a=a[i]; t[i].
x=x[i];
86 using namespace Float;
92 for (
int i = x.
size(); i--; ) {
93 t[i].
a=a[i]; t[i].
x=x[i];
101 using namespace Float;
105 for (
int i = x.
size(); i--; ) {
106 t[i].
a=1.0; t[i].
x=x[i];
123 if (home.
failed())
return;
131 using namespace Float;
135 for (
int i = x.
size(); i--; ) {
136 t[i].
a=1.0; t[i].
x=x[i];
146 using namespace Float;
152 for (
int i = x.
size(); i--; ) {
153 t[i].
a=a[i]; t[i].
x=x[i];
170 if (home.
failed())
return;
179 using namespace Float;
185 for (
int i = x.
size(); i--; ) {
186 t[i].
a=a[i]; t[i].
x=x[i];
int size(void) const
Return size of array (number of elements).
FloatNum size(void) const
Return size of float value (distance between maximum and minimum).
Home class for posting propagators
bool failed(void) const
Check whether corresponding space is failed.
Exception: Arguments are of different size
Class for describing linear term .
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
Reification specification.
void post(Home home, Term< IntView > *t, int n, IntRelType irt, int c, IntPropLevel=IPL_DEF)
Post propagator for linear constraint over integers.
#define GECODE_POST
Check for failure in a constraint post function.
#define GECODE_ME_FAIL(me)
Check whether modification event me is failed, and fail space home.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
double FloatNum
Floating point number base type.
FloatRelType
Relation types for floats.
@ FRT_LQ
Less or equal ( ).
@ FRT_GQ
Greater or equal ( ).
Gecode toplevel namespace
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .