#include <CalculusHelper.h>
Static Public Member Functions | |
| static Float | evalFunction (RealRealFunction pFunction, const Float &x, Int n=0) |
| Evaluate a real real function of the form y = f(x) at position x. | |
| static Float | calcDerivative (RealRealFunction pFunction, const Float &x, Int n=1) |
| Numerically approximate the n-th derivative f(n)(x) of a real real function. | |
| static Float | integrate (RealRealFunction pFunction, const Float &x1, const Float &x2, bool bIntegrateAbsolutely=false, Int iIntervals=10000) |
| Numerically integrate a real real function of the form y = f(x). | |
TCalculusHelper is a static class encapsulating numerical calculus of real real functions, such as derivatives and integration.
| Float zeus::TCalculusHelper::calcDerivative | ( | RealRealFunction | pFunction, |
| const Float & | x, | ||
| Int | n = 1 |
||
| ) | [static] |
Numerically approximate the n-th derivative f(n)(x) of a real real function.
Numerically approximate the n-th derivative f(n)(x) of a real real function of the form
y = f(x)
at position x.
| pFunction | [IN]: Pointer to a real real function. |
| x | [IN]: x value for which f(n)(x) is to be calculated. |
| n | [IN]: Order of the derivative. |
| Float zeus::TCalculusHelper::evalFunction | ( | RealRealFunction | pFunction, |
| const Float & | x, | ||
| Int | n = 0 |
||
| ) | [static] |
Evaluate a real real function of the form y = f(x) at position x.
Evaluate a real real function of the form
y = f(x)
at position x.
| pFunction | [IN]: Pointer to a real real function. |
| x | [IN]: x value for which f(x) is to be calculated. |
| n | [IN]: Order of the derivative. Unused. |
| Float zeus::TCalculusHelper::integrate | ( | RealRealFunction | pFunction, |
| const Float & | x1, | ||
| const Float & | x2, | ||
| bool | bIntegrateAbsolutely = false, |
||
| Int | iIntervals = 10000 |
||
| ) | [static] |
Numerically integrate a real real function of the form y = f(x).
Numerically integrate a real real function of the form
y = f(x)
from position x1 to position x2.
| pFunction | [IN]: Pointer to a real real function. |
| x1 | [IN]: Start position of the integration interval. |
| x2 | [IN]: End position of the integration interval. |
| bIntegrateAbsolutely | [IN]: If true, |f(x)| is integrated instead of f(x). |
| iIntervals | [IN]: Number of intervals for the numerical integration. A higher number implies higher precision, but longer calculation time. |
Use a value of 1 for linear functions.