HyperspaceExplorer 0.7.1
|
A function describing a P
dimensional surface in N
dimensional space.
More...
#include <ParametricFunction.h>
Public Types | |
typedef VecMath::Vector< P, NUM > | argument_type |
The argument type for the function - a P dimensional Vector. | |
typedef VecMath::Vector< N, NUM > | return_type |
The return type of the function - a N dimensional Vector. | |
Public Member Functions | |
virtual return_type | f (const argument_type &x)=0 |
The function defining the parametric equation for the P -surface. | |
std::string | getName () const |
std::string | getDescription () const |
unsigned | getNumParameters () const |
ParameterMap | getParameterMap () const |
FunctionParameter::parameter_ptr_type | getParameter (const std::string &name) |
FunctionParameter::value_ptr_type | getParameterValue (const std::string &name) |
argument_type | getDefaultXMin () const |
argument_type | getDefaultXMax () const |
Protected Member Functions | |
void | setName (const std::string &newName) |
Give the function a name - only allowed for classes implementing ParametricFunction. | |
void | setDescription (const std::string &newDescription) |
Give the function a description - only allowed for classes implementing ParametricFunction. | |
template<typename T > | |
void | declareParameter (const std::string ¶meter_name, const T ¶meter_default_value) |
Add a parameter with a name and a default value to the parameter list. | |
template<typename T > | |
void | declareParameter (const std::string ¶meter_name, const T ¶meter_default_value, const T ¶meter_value) |
Add a parameter with a name, a value and a default value to the parameter list. | |
void | setDefaultBoundaries (const ParametricFunction::argument_type &x_min, const ParametricFunction::argument_type &x_max) |
Change the definition space on which this function is evaluated by default. | |
Private Attributes | |
std::string | _function_name |
Name for the function. | |
std::string | _function_description |
Slightly more exhaustive description of the function. | |
ParameterMap | _parameters |
List of FunctionParameter s the function might have. | |
argument_type | _default_x_min |
Default lower boundary of definition space. | |
argument_type | _default_x_max |
Default upper boundary of definition space. |
A function describing a P
dimensional surface in N
dimensional space.
See also http://en.wikipedia.org/wiki/Parametric_surface for an explanation of two-dimensional surfaces in three-dimensional space, ie. a ParametricFunction < 3, 2 >.
A ParametricFunction has the following attributes:
It also has a mathematical function which defines the parametric P
-surface in N
-space. This function must be implemented in a daughter class of ParametricFunction < N, P > as the pure virtual function
N | The dimension of the definition vector space. |
P | The dimension of the parameter vector space. |
NUM | The numeric type managed by the grid. |
void ParametricFunction< N, P, NUM >::declareParameter | ( | const std::string & | parameter_name, |
const T & | parameter_default_value | ||
) | [inline, protected] |
Add a parameter with a name and a default value to the parameter list.
T | Type of the parameter to be declared. |
parameter_name | Name of the parameter. |
parameter_default_value | Default value for the parameter. |
void ParametricFunction< N, P, NUM >::declareParameter | ( | const std::string & | parameter_name, |
const T & | parameter_default_value, | ||
const T & | parameter_value | ||
) | [inline, protected] |
Add a parameter with a name, a value and a default value to the parameter list.
T | Type of the parameter to be declared. |
parameter_name | Name of the parameter. |
parameter_default_value | Default value for the parameter. |
parameter_value | Actual value of the parameter. |
virtual return_type ParametricFunction< N, P, NUM >::f | ( | const argument_type & | x | ) | [pure virtual] |
The function defining the parametric equation for the P
-surface.
Implement this in every derived class.
x | Value of the parameter to be evaluated. |
x
. Implemented in ParametricTestFunction, Hypersphere::DefiningFunction, Torus1::DefiningFunction, Torus2::DefiningFunction, Fr3r::DefiningFunction, GravitationPotential::DefiningFunction, Fr3rSin::DefiningFunction, Fr3rExp::DefiningFunction, Polar::DefiningFunction, PolarSin::DefiningFunction, PolarSin2::DefiningFunction, PolarR::DefiningFunction, ComplexFunction::DefiningFunction, Surface1::DefiningFunction, Horizon::DefiningFunction, and Torus3::DefiningFunction.
argument_type ParametricFunction< N, P, NUM >::getDefaultXMax | ( | ) | const [inline] |
argument_type ParametricFunction< N, P, NUM >::getDefaultXMin | ( | ) | const [inline] |
std::string ParametricFunction< N, P, NUM >::getDescription | ( | ) | const [inline] |
std::string ParametricFunction< N, P, NUM >::getName | ( | ) | const [inline] |
unsigned ParametricFunction< N, P, NUM >::getNumParameters | ( | ) | const [inline] |
FunctionParameter::parameter_ptr_type ParametricFunction< N, P, NUM >::getParameter | ( | const std::string & | name | ) | [inline] |
name
. ParameterMap ParametricFunction< N, P, NUM >::getParameterMap | ( | ) | const [inline] |
FunctionParameter::value_ptr_type ParametricFunction< N, P, NUM >::getParameterValue | ( | const std::string & | name | ) | [inline] |
name
.