Example: Folium of Descartes More...
Public Member Functions | |
DescartesFolium (const Options &) | |
Actual model. More... | |
DescartesFolium (bool share, DescartesFolium &p) | |
Constructor for cloning p. More... | |
virtual Space * | copy (bool share) |
Copy during cloning. More... | |
virtual void | constrain (const Space &_b) |
Add constraint to current model to get next solution (not too close) More... | |
virtual void | print (std::ostream &os) const |
Print solution coordinates. More... | |
![]() | |
ScriptBase (void) | |
Default constructor. More... | |
ScriptBase (bool share, ScriptBase &e) | |
Constructor used for cloning. More... | |
virtual void | compare (const Space &, std::ostream &os) const |
Compare with s. More... | |
Protected Attributes | |
FloatVarArray | f |
The numbers. More... | |
double | step |
Minimum distance between two solutions. More... | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
Additional Inherited Members | |
![]() | |
static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
Choose output stream according to name. More... | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt, Script *s=NULL) |
Example: Folium of Descartes
The folium of Descartes is a curve defined by the equation:
A technique to solve it, is to write and solve for
and
in terms of
. By setting
, it yields to the paramatric equation:
The parameter is related to the position on the curve and is constrained to get different solutions for
and
. To get reasonable interval starting sizes,
and
are restricted to
and
is restricted to
.
Definition at line 72 of file descartes-folium.cpp.
|
inline |
Actual model.
Definition at line 80 of file descartes-folium.cpp.
|
inline |
Constructor for cloning p.
Definition at line 94 of file descartes-folium.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 99 of file descartes-folium.cpp.
|
inlinevirtual |
Add constraint to current model to get next solution (not too close)
Definition at line 103 of file descartes-folium.cpp.
|
inlinevirtual |
Print solution coordinates.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 108 of file descartes-folium.cpp.
|
related |
Main-function.
Definition at line 118 of file descartes-folium.cpp.
|
protected |
The numbers.
Definition at line 75 of file descartes-folium.cpp.
|
protected |
Minimum distance between two solutions.
Definition at line 77 of file descartes-folium.cpp.