48 for (
int i=0; i<n; i++) {
49 t[i].
a=1; t[i].
x=
x[i];
63 for (
int i=0; i<n; i++) {
64 t[i].
a=1; t[i].
x=
x[i];
74 if (a.
size() !=
x.size())
82 for (
int i=0; i<n; i++) {
83 t[i].
a=a[i]; t[i].
x=
x[i];
93 if (a.
size() !=
x.size())
102 for (
int i=0; i<n; i++) {
103 t[i].
a=a[i]; t[i].
x=
x[i];
120 if (home.
failed())
return;
132 for (
int i=0; i<n; i++) {
133 t[i].
a=1; t[i].
x=
x[i];
147 for (
int i=0; i<n; i++) {
148 t[i].
a=1; t[i].
x=
x[i];
158 if (a.
size() !=
x.size())
165 for (
int i=0; i<n; i++) {
166 t[i].
a=a[i]; t[i].
x=
x[i];
176 if (a.
size() !=
x.size())
183 for (
int i=0; i<n; i++) {
184 t[i].
a=a[i]; t[i].
x=
x[i];
Passing Boolean variables.
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.
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