90 rel(*
this, 3*p/(1+
pow(p,3)) == x);
92 rel(*
this,
pow(x,3) +
pow(y,3) == 3 * x * y);
111 virtual void print(std::ostream& os)
const {
112 os <<
"XY " << f[1].med() <<
" " << f[2].med()
121 int main(
int argc,
char* argv[]) {
125 opt.
parse(argc,argv);
126 FloatMaximizeScript::run<DescartesFolium,BAB,Options>(
opt);
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
DescartesFolium(const Options &opt)
Actual model.
virtual Space * copy(bool share)
Copy during cloning.
int main(int argc, char *argv[])
Main-function.
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
FloatVarArray f
The numbers.
DescartesFolium(bool share, DescartesFolium &p)
Constructor for cloning p.
Parametric base-class for scripts.
void update(Space &, bool share, VarArray< Var > &a)
Update array to be a clone of array a.
int p
Number of positive literals for node type.
void step(double s)
Set default step value.
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void trace(int f)
Set trace flags.
FloatValBranch FLOAT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
virtual void print(std::ostream &os) const
Print solution coordinates.
Post propagator for SetVar SetOpType SetVar y
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
void solutions(unsigned int n)
Set default number of solutions to search for.
double step
Minimum distance between two solutions.
Post propagator for SetVar x
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te, FloatTracer &t)
Create a tracer for float variables.
Gecode toplevel namespace
virtual FloatVar cost(void) const
Cost function.
Example: Folium of Descartes