BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
BALL::ParsedFunction< arg > Class Template Reference

#include <BALL/MATHS/parsedFunction.h>

Inheritance diagram for BALL::ParsedFunction< arg >:

Public Member Functions

template<>
BALL_EXPORT double operator() (float argument)
 
template<>
BALL_EXPORT double operator() (double argument)
 
Constructors and Destructors
 ParsedFunction ()
 Default constructor. More...
 
 ParsedFunction (const String &expression)
 Detailed constructor. More...
 
 ParsedFunction (const ParsedFunction &func)
 Copy constructor. More...
 
 ~ParsedFunction ()
 Destructor. More...
 
Accessors
double operator() (arg p)
 
Parsing
void initTable ()
 

Public Attributes

StringHashMap< double * > constants_
 
StringHashMap< double(*)(double)> functions_
 

Protected Attributes

String expression_
 

Detailed Description

template<typename arg>
class BALL::ParsedFunction< arg >

ParsedFunction. This function type contains a double - valued function string like $var1=atan(.5); sin(cos(atan(asin(exp(X+var1)))))$. When the operator () is called, $X$ is replaced with the argument of the operator call and the function string is parsed and evaluated.

Definition at line 37 of file parsedFunction.h.

Member Function Documentation

template<>
BALL_EXPORT double BALL::ParsedFunction< float >::operator() ( float  argument)
template<>
BALL_EXPORT double BALL::ParsedFunction< double >::operator() ( double  argument)

Member Data Documentation

template<typename arg >
StringHashMap<double*> BALL::ParsedFunction< arg >::constants_

The table of constants

Definition at line 78 of file parsedFunction.h.

template<typename arg >
String BALL::ParsedFunction< arg >::expression_
protected

Definition at line 85 of file parsedFunction.h.

template<typename arg >
StringHashMap<double (*)(double)> BALL::ParsedFunction< arg >::functions_

The table of functions

Definition at line 82 of file parsedFunction.h.