47 for (
int i=0; i<
x.size(); i++) {
48 t[i].
a=1; t[i].
x=
x[i];
60 for (
int i=0; i<
x.size(); i++) {
61 t[i].
a=1; t[i].
x=
x[i];
70 if (a.
size() !=
x.size())
75 for (
int i=0; i<
x.size(); i++) {
76 t[i].
a=a[i]; t[i].
x=
x[i];
85 if (a.
size() !=
x.size())
90 for (
int i=0; i<
x.size(); i++) {
91 t[i].
a=a[i]; t[i].
x=
x[i];
103 for (
int i=0; i<
x.size(); i++) {
104 t[i].
a=1; t[i].
x=
x[i];
107 estimate(t,
x.size(),0,
min,
max);
121 if (home.
failed())
return;
122 t[
x.size()].
a=-1; t[
x.size()].
x=
y;
133 for (
int i=0; i<
x.size(); i++) {
134 t[i].
a=1; t[i].
x=
x[i];
136 t[
x.size()].
a=-1; t[
x.size()].
x=
y;
144 if (a.
size() !=
x.size())
149 for (
int i=0; i<
x.size(); i++) {
150 t[i].
a=a[i]; t[i].
x=
x[i];
153 estimate(t,
x.size(),0,
min,
max);
167 if (home.
failed())
return;
168 t[
x.size()].
a=-1; t[
x.size()].
x=
y;
176 if (a.
size() !=
x.size())
181 for (
int i=0; i<
x.size(); i++) {
182 t[i].
a=a[i]; t[i].
x=
x[i];
184 t[
x.size()].
a=-1; t[
x.size()].
x=
y;
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.
Passing integer arguments.
Passing integer variables.
Exception: Arguments are of different size
Integer view for integer variables.
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 .
IntRelType
Relation types for integers.
IntPropLevel
Propagation levels for integer propagators.
@ IRT_GQ
Greater or equal ( )
@ IRT_LQ
Less or equal ( )
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar x