FEDEM Model Database  R8.0
Source code of the FEDEM model database
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
FFaMathExprFactory Class Reference

Singelton class holding all mathematical expression objects. More...

#include <FFaMathExprFactory.H>

Inheritance diagram for FFaMathExprFactory:
Inheritance graph
[legend]
Collaboration diagram for FFaMathExprFactory:
Collaboration graph
[legend]

Classes

class  FFaMathFunc
 Class describing a mathematical expression. More...
 

Public Member Functions

int create (int id, const std::string &expression, size_t nvar=1, const char **vars=0)
 Creates a new FFaMathFunc instance from the string expression. More...
 
double getValue (int id, double arg, int &error)
 Evaluates a single-argument math expression. More...
 
double getValue (int id, const double *arg, int &error)
 Evaluates a multi-argument math expression. More...
 
double getDiff (int id, double arg, int &error)
 Evaluates the derivative of a single-argument math expression. More...
 
double getDiff (int id, size_t idArg, const double *arg, int &error)
 Evaluates a derivative of a multi-argument math expression. More...
 

Static Public Member Functions

static size_t countArgs (const std::string &expression, const char **vars, std::vector< bool > *present=0)
 Counts the occurances of arguments vars in expression. More...
 
- Static Public Member Functions inherited from FFaSingelton< FFaMathExprFactory >
static FFaMathExprFactory * instance ()
 Returns the actual instance of this class. More...
 
static void removeInstance ()
 Deletes the dynamically allocated instance. More...
 
static bool allocated ()
 Returns true, if the instance has been allocated. More...
 

Private Member Functions

 FFaMathExprFactory ()
 The constructor is private to allow singelton construction only. More...
 
virtual ~FFaMathExprFactory ()
 The destructor is private to allow singelton destruction only. More...
 

Private Attributes

std::map< int, FFaMathFunc > myIndexMap
 

Friends

class FFaSingelton< FFaMathExprFactory >
 To allow construction and destruction. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FFaSingelton< FFaMathExprFactory >
 FFaSingelton ()
 The constructor is protected to allow objects of sub-classes only. More...
 
 FFaSingelton (const FFaSingelton &)=delete
 Disable default copy constructor. More...
 
FFaSingelton & operator= (const FFaSingelton &)=delete
 Disable default assignment operator. More...
 

Detailed Description

Singelton class holding all mathematical expression objects.

Constructor & Destructor Documentation

◆ FFaMathExprFactory()

FFaMathExprFactory::FFaMathExprFactory ( )
inlineprivate

The constructor is private to allow singelton construction only.

◆ ~FFaMathExprFactory()

virtual FFaMathExprFactory::~FFaMathExprFactory ( )
inlineprivatevirtual

The destructor is private to allow singelton destruction only.

Member Function Documentation

◆ countArgs()

size_t FFaMathExprFactory::countArgs ( const std::string &  expression,
const char **  vars,
std::vector< bool > *  present = 0 
)
static

Counts the occurances of arguments vars in expression.

◆ create()

int FFaMathExprFactory::create ( int  id,
const std::string &  expression,
size_t  nvar = 1,
const char **  vars = 0 
)

Creates a new FFaMathFunc instance from the string expression.

◆ getDiff() [1/2]

double FFaMathExprFactory::getDiff ( int  id,
double  arg,
int &  error 
)

Evaluates the derivative of a single-argument math expression.

◆ getDiff() [2/2]

double FFaMathExprFactory::getDiff ( int  id,
size_t  idArg,
const double *  arg,
int &  error 
)

Evaluates a derivative of a multi-argument math expression.

◆ getValue() [1/2]

double FFaMathExprFactory::getValue ( int  id,
const double *  arg,
int &  error 
)

Evaluates a multi-argument math expression.

◆ getValue() [2/2]

double FFaMathExprFactory::getValue ( int  id,
double  arg,
int &  error 
)

Evaluates a single-argument math expression.

Friends And Related Function Documentation

◆ FFaSingelton< FFaMathExprFactory >

friend class FFaSingelton< FFaMathExprFactory >
friend

To allow construction and destruction.

Member Data Documentation

◆ myIndexMap

std::map<int,FFaMathFunc> FFaMathExprFactory::myIndexMap
private

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