QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
RichardsonExtrapolation Class Reference

Richardson Extrapolation. More...

#include <ql/math/richardsonextrapolation.hpp>

Public Member Functions

 RichardsonExtrapolation (const std::function< Real(Real)> &f, Real delta_h, Real n=Null< Real >())
Real operator() (Real t=2.0) const
Real operator() (Real t, Real s) const

Detailed Description

Richardson Extrapolation.

Richardson Extrapolation is a sequence acceleration technique for

\[ f(\Delta h) = f_0 + \alpha\cdot (\Delta h)^n + O((\Delta h)^{n+1}) \]

References: http://en.wikipedia.org/wiki/Richardson_extrapolation

Constructor & Destructor Documentation

◆ RichardsonExtrapolation()

RichardsonExtrapolation ( const std::function< Real(Real)> & f,
Real delta_h,
Real n = NullReal >() )

Richardon Extrapolation

Parameters
ffunction to be extrapolated to delta_h -> 0
delta_hstep size
nif known, n is the order of convergence

Member Function Documentation

◆ operator()() [1/2]

Real operator() ( Real t = 2.0) const

Extrapolation for known order of convergence

Parameters
tscaling factor for the step size

◆ operator()() [2/2]

Real operator() ( Real t,
Real s ) const

Extrapolation for unknown order of convergence

Parameters
tfirst scaling factor for the step size
ssecond scaling factor for the step size