
Example: Folium of Descartes More...
Public Member Functions | |
| DescartesFolium (const Options &opt) | |
| Actual model. | |
| DescartesFolium (DescartesFolium &p) | |
| Constructor for cloning p. | |
| virtual Space * | copy (void) |
| Copy during cloning. | |
| virtual FloatVar | cost (void) const |
| Cost function. | |
| virtual void | print (std::ostream &os) const |
| Print solution coordinates. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::ExtractStepOption< FloatMaximizeSpace > > | |
| ScriptBase (const Options &opt) | |
| Constructor. | |
| ScriptBase (ScriptBase &e) | |
| Constructor used for cloning. | |
| virtual void | compare (const Space &home, std::ostream &os) const |
| Compare with s. | |
| ScriptBase (const Options &opt) | |
| Constructor. | |
| ScriptBase (ScriptBase &e) | |
| Constructor used for cloning. | |
| virtual void | compare (const Space &home, std::ostream &os) const |
| Compare with s. | |
Public Member Functions inherited from Gecode::Driver::ExtractStepOption< BaseSpace > | |
| ExtractStepOption (const Options &opt) | |
| Constructor that extracts the step value. | |
| ExtractStepOption (BaseSpace &e) | |
| Constructor used for cloning. | |
Protected Attributes | |
| FloatVarArray | f |
| The numbers. | |
| double | step |
| Minimum distance between two solutions. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::ExtractStepOption< FloatMaximizeSpace > > | |
| static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
| Choose output stream according to sn. | |
| static void | run (const Options &opt, Script *s=NULL) |
| static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
| Choose output stream according to sn. | |
| static void | run (const Options &opt, Script *s=NULL) |
Example: Folium of Descartes
The folium of Descartes is a curve defined by the equation:
![\[x^3 + y^3 - 3axy = 0
\]](form_33.png)
A technique to solve it, is to write 




![\[x^3 + y^3 - 3xy = 0
\]](form_36.png)
![\[x=\frac{3p}{1+p^3},\quad y=\frac{3p^2}{1+p^3}
\]](form_37.png)
The parameter 




![$[-20;20]$](form_21.png)

![$[-1;2]$](form_38.png)
Definition at line 68 of file descartes-folium.cpp.
|
inline |
Actual model.
Definition at line 76 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 |
Cost function.
Definition at line 103 of file descartes-folium.cpp.
|
inlinevirtual |
Print solution coordinates.
Reimplemented from Gecode::Driver::ScriptBase< Driver::ExtractStepOption< FloatMaximizeSpace > >.
Definition at line 107 of file descartes-folium.cpp.
|
Main-function.
Definition at line 117 of file descartes-folium.cpp.
|
protected |
The numbers.
Definition at line 71 of file descartes-folium.cpp.
|
protected |
Minimum distance between two solutions.
Definition at line 73 of file descartes-folium.cpp.