This class is the interface for defining your own function that may be included in expressions.
More...
#include <CustomFunction.h>
|
| virtual | ~CustomFunction () |
| |
| virtual CustomFunction * | clone () const =0 |
| | Create a new duplicate of this object on the heap using the "new" operator.
|
| |
| virtual double | evaluate (const double *arguments) const =0 |
| | Evaluate the function.
|
| |
| virtual double | evaluateDerivative (const double *arguments, const int *derivOrder) const =0 |
| | Evaluate a derivative of the function.
|
| |
| virtual int | getNumArguments () const =0 |
| | Get the number of arguments this function expects.
|
| |
This class is the interface for defining your own function that may be included in expressions.
To use it, create a concrete subclass that implements all of the virtual methods for each new function you want to define. Then when you call Parser::parse() to parse an expression, pass a map of function names to CustomFunction objects.
◆ ~CustomFunction()
| virtual PLMD::lepton::CustomFunction::~CustomFunction |
( |
| ) |
|
|
inlinevirtual |
◆ clone()
| virtual CustomFunction * PLMD::lepton::CustomFunction::clone |
( |
| ) |
const |
|
pure virtual |
◆ evaluate()
| virtual double PLMD::lepton::CustomFunction::evaluate |
( |
const double * | arguments | ) |
const |
|
pure virtual |
◆ evaluateDerivative()
| virtual double PLMD::lepton::CustomFunction::evaluateDerivative |
( |
const double * | arguments, |
|
|
const int * | derivOrder ) const |
|
pure virtual |
Evaluate a derivative of the function.
- Parameters
-
| arguments | the array of argument values |
| derivOrder | an array specifying the number of times the function has been differentiated with respect to each of its arguments. For example, the array {0, 2} indicates a second derivative with respect to the second argument. |
Implemented in PLMD::lepton::PlaceholderFunction.
◆ getNumArguments()
| virtual int PLMD::lepton::CustomFunction::getNumArguments |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: