|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Numerical Differentiation on arbitrarily spaced grids. More...
#include <numericaldifferentiation.hpp>
Collaboration diagram for NumericalDifferentiation:Public Types | |
| enum | Scheme { Central , Backward , Forward } |
Public Member Functions | |
| NumericalDifferentiation (std::function< Real(Real)> f, Size orderOfDerivative, Array x_offsets) | |
| NumericalDifferentiation (std::function< Real(Real)> f, Size orderOfDerivative, Real stepSize, Size steps, Scheme scheme) | |
| Real | operator() (Real x) const |
| const Array & | offsets () const |
| const Array & | weights () const |
Private Attributes | |
| const Array | offsets_ |
| const Array | w_ |
| const std::function< Real(Real)> | f_ |
Numerical Differentiation on arbitrarily spaced grids.
References:
B. Fornberg, 1988. Generation of Finite Difference Formulas on Arbitrarily Spaced Grids, http://amath.colorado.edu/faculty/fornberg/Docs/MathComp_88_FD_formulas.pdf
Definition at line 41 of file numericaldifferentiation.hpp.
| enum Scheme |
| Enumerator | |
|---|---|
| Central | |
| Backward | |
| Forward | |
Definition at line 43 of file numericaldifferentiation.hpp.
| NumericalDifferentiation | ( | std::function< Real(Real)> | f, |
| Size | orderOfDerivative, | ||
| Array | x_offsets | ||
| ) |
Definition at line 106 of file numericaldifferentiation.cpp.
| NumericalDifferentiation | ( | std::function< Real(Real)> | f, |
| Size | orderOfDerivative, | ||
| Real | stepSize, | ||
| Size | steps, | ||
| Scheme | scheme | ||
| ) |
Definition at line 113 of file numericaldifferentiation.cpp.
Definition at line 65 of file numericaldifferentiation.hpp.
Here is the call graph for this function:| const Array & offsets | ( | ) | const |
Definition at line 79 of file numericaldifferentiation.hpp.
| const Array & weights | ( | ) | const |
Definition at line 75 of file numericaldifferentiation.hpp.
Here is the caller graph for this function:
|
private |
Definition at line 60 of file numericaldifferentiation.hpp.
|
private |
Definition at line 60 of file numericaldifferentiation.hpp.
Definition at line 61 of file numericaldifferentiation.hpp.