QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
Numerical Differentiation on arbitrarily spaced grids. More...
#include <ql/methods/finitedifferences/operators/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 |
Public Attributes | |
QL_DEPRECATED typedef Real | argument_type |
QL_DEPRECATED typedef Real | result_type |
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 55 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 77 of file numericaldifferentiation.hpp.
const Array & offsets | ( | ) | const |
Definition at line 91 of file numericaldifferentiation.hpp.
const Array & weights | ( | ) | const |
Definition at line 87 of file numericaldifferentiation.hpp.
QL_DEPRECATED typedef Real argument_type |
auto
or decltype
instead. Deprecated in version 1.29. Definition at line 47 of file numericaldifferentiation.hpp.
QL_DEPRECATED typedef Real result_type |
auto
or decltype
instead. Deprecated in version 1.29. Definition at line 53 of file numericaldifferentiation.hpp.
|
private |
Definition at line 72 of file numericaldifferentiation.hpp.
|
private |
Definition at line 72 of file numericaldifferentiation.hpp.
Definition at line 73 of file numericaldifferentiation.hpp.