Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

ParsedFunction< arg > Class Template Reference
[Function classes]

ParsedFunction. More...

#include <parsedFunction.h>

List of all members.

Public Member Functions

Constructors and Destructors
 ParsedFunction () throw ()
 Default constructor.
 ParsedFunction (const String &expression) throw ()
 Detailed constructor.
 ParsedFunction (const ParsedFunction &func) throw ()
 Copy constructor.
 ~ParsedFunction () throw ()
 Destructor.
Accessors
double operator() (arg p) throw (Exception::ParseError)
 Evaluate the function at point $p$.
Parsing
void initTable () throw ()
 This function initializes the function table and the constant table of our parser.

Public Attributes

HashMap< String, double * > constants_
 The table of constants.
HashMap< String, double(*)(double)> functions_
 The table of functions.

Protected Attributes

String expression_


Detailed Description

template<typename arg>
class 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.


Member Function Documentation

template<typename arg>
void ParsedFunction< arg >::initTable  )  throw ()
 

This function initializes the function table and the constant table of our parser.

template<typename arg>
double ParsedFunction< arg >::operator() arg  p  )  throw (Exception::ParseError)
 

Evaluate the function at point $p$.