This class is the interface for defining your own function that may be included in expressions.
More...
#include <CustomFunction.h>
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()
Create a new duplicate of this object on the heap using the "new" operator.
◆ evaluate()
virtual double PLMD::lepton::CustomFunction::evaluate |
( |
const double * |
arguments | ) |
const |
|
pure virtual |
Evaluate the function.
- Parameters
-
arguments | the array of argument values |
◆ 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. |
◆ getNumArguments()
virtual int PLMD::lepton::CustomFunction::getNumArguments |
( |
| ) |
const |
|
pure virtual |
Get the number of arguments this function expects.
The documentation for this class was generated from the following file: