HyperspaceExplorer 0.7.1
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
ParametricFunction< N, P, NUM > Class Template Reference

A function describing a P dimensional surface in N dimensional space. More...

#include <ParametricFunction.h>

Inheritance diagram for ParametricFunction< N, P, NUM >:
Inheritance graph
[legend]
Collaboration diagram for ParametricFunction< N, P, NUM >:
Collaboration graph
[legend]

List of all members.

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 &parameter_name, const T &parameter_default_value)
 Add a parameter with a name and a default value to the parameter list.
template<typename T >
void declareParameter (const std::string &parameter_name, const T &parameter_default_value, const T &parameter_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.

Detailed Description

template<unsigned N, unsigned P, typename NUM = double>
class ParametricFunction< N, P, NUM >

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 $ f: R^P \rightarrow R^N $ 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

See also:
f().
Template Parameters:
NThe dimension of the definition vector space.
PThe dimension of the parameter vector space.
NUMThe numeric type managed by the grid.
Author:
Lene Preuss <lene.preuss@gmail.com>

Member Function Documentation

template<unsigned N, unsigned P, typename NUM >
template<typename T >
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.

Template Parameters:
TType of the parameter to be declared.
Parameters:
parameter_nameName of the parameter.
parameter_default_valueDefault value for the parameter.
template<unsigned N, unsigned P, typename NUM >
template<typename T >
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.

Template Parameters:
TType of the parameter to be declared.
Parameters:
parameter_nameName of the parameter.
parameter_default_valueDefault value for the parameter.
parameter_valueActual value of the parameter.
template<unsigned N, unsigned P, typename NUM = double>
virtual return_type ParametricFunction< N, P, NUM >::f ( const argument_type x) [pure virtual]
template<unsigned N, unsigned P, typename NUM = double>
argument_type ParametricFunction< N, P, NUM >::getDefaultXMax ( ) const [inline]
Returns:
The upper boundary in parameter space which is set initially.
template<unsigned N, unsigned P, typename NUM = double>
argument_type ParametricFunction< N, P, NUM >::getDefaultXMin ( ) const [inline]
Returns:
The lower boundary in parameter space which is set initially.
template<unsigned N, unsigned P, typename NUM = double>
std::string ParametricFunction< N, P, NUM >::getDescription ( ) const [inline]
Returns:
An optional description of the function.
template<unsigned N, unsigned P, typename NUM = double>
std::string ParametricFunction< N, P, NUM >::getName ( ) const [inline]
Returns:
The name of the function as string.
template<unsigned N, unsigned P, typename NUM >
unsigned ParametricFunction< N, P, NUM >::getNumParameters ( ) const [inline]
Returns:
Number of additional parameters for the function.
template<unsigned N, unsigned P, typename NUM = double>
FunctionParameter::parameter_ptr_type ParametricFunction< N, P, NUM >::getParameter ( const std::string name) [inline]
Returns:
Pointer to the FunctionParameter which is named name.
template<unsigned N, unsigned P, typename NUM = double>
ParameterMap ParametricFunction< N, P, NUM >::getParameterMap ( ) const [inline]
Returns:
The collection of all additional parameters (and their values).
template<unsigned N, unsigned P, typename NUM = double>
FunctionParameter::value_ptr_type ParametricFunction< N, P, NUM >::getParameterValue ( const std::string name) [inline]
Returns:
Pointer to the FunctionParameterValue which is named name.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:18 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo