Generated on Tue Apr 18 10:22:58 2017 for Gecode by doxygen 1.6.3

ArchimedeanSpiral Class Reference
[Example scripts (models)]

Example: Archimedean spiral More...

List of all members.

Public Member Functions

 ArchimedeanSpiral (const Options &opt)
 Actual model.
 ArchimedeanSpiral (bool share, ArchimedeanSpiral &p)
 Constructor for cloning p.
virtual Spacecopy (bool share)
 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.

Detailed Description

Example: Archimedean spiral

The Archimedean Spiral is a spiral where all points corresponding to the locations over time of a point moving away from a fixed point with a constant speed along a line which rotates with constant angular velocity. It is defined by the polar equation:

\[ r = a+b\theta \]

To get cartesian coordinates, it can be solved for $x$ and $y$ in terms of $r$ and $\theta$. By setting $a=1$ and $b=1$, it yields to the equation:

\[ r = \theta \]


\[ x=r\operatorname{cos}(\theta), \quad y=r\operatorname{sin}(\theta) \]

The tuple $(r,\theta)$ is related to the position for $x$ and $y$ on the curve. $r$ and $\theta$ are positive numbers.

To get reasonable interval starting * sizes, $x$ and $y$ are restricted to $[-20;20]$.

Definition at line 71 of file archimedean-spiral.cpp.

Constructor & Destructor Documentation

ArchimedeanSpiral::ArchimedeanSpiral ( const Options opt  )  [inline]

Actual model.

Definition at line 77 of file archimedean-spiral.cpp.

ArchimedeanSpiral::ArchimedeanSpiral ( bool  share,
ArchimedeanSpiral p 
) [inline]

Constructor for cloning p.

Definition at line 95 of file archimedean-spiral.cpp.

Member Function Documentation

virtual Space* ArchimedeanSpiral::copy ( bool  share  )  [inline, virtual]

Copy during cloning.

Definition at line 100 of file archimedean-spiral.cpp.

virtual FloatVar ArchimedeanSpiral::cost ( void   )  const [inline, virtual]

Cost function.

Definition at line 104 of file archimedean-spiral.cpp.

virtual void ArchimedeanSpiral::print ( std::ostream &  os  )  const [inline, virtual]

Print solution coordinates.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 108 of file archimedean-spiral.cpp.

Member Data Documentation

The numbers.

Definition at line 74 of file archimedean-spiral.cpp.

The documentation for this class was generated from the following file: