81 : f(*this,3,-20,20), step(0.1) {
86 rel(*
this, 3*p/(1+
pow(p,3)) == x);
88 rel(*
this,
pow(x,3) +
pow(y,3) == 3 * x * y);
95 :
Script(share,p), step(p.step) {
105 rel(*
this, f[0] >= (b.
f[0].max()+
step));
108 virtual void print(std::ostream& os)
const {
109 os <<
"XY " << f[1].med() <<
" " << f[2].med()
118 int main(
int argc,
char* argv[]) {
120 opt.
parse(argc,argv);
122 Script::run<DescartesFolium,BAB,Options>(
opt);
const Gecode::FloatNum step
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$.
virtual void print(std::ostream &os) const
Print solution coordinates.
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 sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
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 constrain(const Space &_b)
Add constraint to current model to get next solution (not too close)
Node * x
Pointer to corresponding Boolean expression node.
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.
DescartesFolium(const Options &)
Actual model.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
BrancherHandle 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.
Example: Folium of Descartes