QuantLib: NumericalDifferentiation Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.6

- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
NumericalDifferentiation Class Reference

Numerical Differentiation on arbitrarily spaced grids. More...

`#include <ql/experimental/math/numericaldifferentiation.hpp>`

Inherits unary_function< Real, Real >.

## Public Types
enum | Scheme { Central, Backward, Forward }

## Public Member Functions
| NumericalDifferentiation (const boost::function< Real(Real)> &f, Size orderOfDerivative, const Array &x_offsets)
| NumericalDifferentiation (const boost::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

## Detailed Description

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