DescartesFolium Class Reference
[Example scripts (models)]
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. | |
Protected Attributes | |
FloatVarArray | f |
The numbers. | |
double | step |
Minimum distance between two solutions. |
Detailed Description
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 68 of file descartes-folium.cpp.
Constructor & Destructor Documentation
DescartesFolium::DescartesFolium | ( | const Options & | opt | ) | [inline] |
Actual model.
Definition at line 76 of file descartes-folium.cpp.
DescartesFolium::DescartesFolium | ( | DescartesFolium & | p | ) | [inline] |
Constructor for cloning p.
Definition at line 94 of file descartes-folium.cpp.
Member Function Documentation
virtual Space* DescartesFolium::copy | ( | void | ) | [inline, virtual] |
Copy during cloning.
Definition at line 99 of file descartes-folium.cpp.
virtual FloatVar DescartesFolium::cost | ( | void | ) | const [inline, virtual] |
Cost function.
Definition at line 103 of file descartes-folium.cpp.
virtual void DescartesFolium::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution coordinates.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 107 of file descartes-folium.cpp.
Member Data Documentation
FloatVarArray DescartesFolium::f [protected] |
The numbers.
Definition at line 71 of file descartes-folium.cpp.
double DescartesFolium::step [protected] |
Minimum distance between two solutions.
Definition at line 73 of file descartes-folium.cpp.
The documentation for this class was generated from the following file:
- examples/descartes-folium.cpp