QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Numerical Differentiation on arbitrarily spaced grids. More...
#include <numericaldifferentiation.hpp>
Public Types | |
enum | Scheme { Central , Backward , Forward } |
Public Member Functions | |
NumericalDifferentiation (ext::function< Real(Real)> f, Size orderOfDerivative, Array x_offsets) | |
NumericalDifferentiation (ext::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 ext::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 | ( | ext::function< Real(Real)> | f, |
Size | orderOfDerivative, | ||
Array | x_offsets | ||
) |
Definition at line 104 of file numericaldifferentiation.cpp.
NumericalDifferentiation | ( | ext::function< Real(Real)> | f, |
Size | orderOfDerivative, | ||
Real | stepSize, | ||
Size | steps, | ||
Scheme | scheme | ||
) |
Definition at line 111 of file numericaldifferentiation.cpp.
Definition at line 65 of file numericaldifferentiation.hpp.
const Array & offsets | ( | ) | const |
Definition at line 79 of file numericaldifferentiation.hpp.
const Array & weights | ( | ) | const |
Definition at line 75 of file numericaldifferentiation.hpp.
|
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.