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;
71 if (
a.size() !=
x.size())
76 for (
int i =
x.size(); i--; ) {
77 t[i].a=
a[i];
t[i].x=
x[i];
86 using namespace Float;
87 if (
a.size() !=
x.size())
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;
124 t[
x.size()].a=-1.0;
t[
x.size()].x=
y;
131 using namespace Float;
135 for (
int i =
x.size(); i--; ) {
136 t[i].a=1.0;
t[i].x=
x[i];
138 t[
x.size()].a=-1;
t[
x.size()].x=
y;
146 using namespace Float;
147 if (
a.size() !=
x.size())
152 for (
int i =
x.size(); i--; ) {
153 t[i].a=
a[i];
t[i].x=
x[i];
170 if (home.
failed())
return;
171 t[
x.size()].a=-1.0;
t[
x.size()].x=
y;
179 using namespace Float;
180 if (
a.size() !=
x.size())
185 for (
int i =
x.size(); i--; ) {
186 t[i].a=
a[i];
t[i].x=
x[i];
188 t[
x.size()].a=-1.0;
t[
x.size()].x=
y;
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
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
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