QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
RichardsonExtrapolation Class Reference

Richardson Extrapolation. More...

#include <richardsonextrapolation.hpp>

+ Collaboration diagram for RichardsonExtrapolation:

Public Member Functions

 RichardsonExtrapolation (const ext::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
 

Private Attributes

const Real delta_h_
 
const Real fdelta_h_
 
const Real n_
 
const ext::function< Real(Real)> f_
 

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

Definition at line 43 of file richardsonextrapolation.hpp.

Constructor & Destructor Documentation

◆ RichardsonExtrapolation()

RichardsonExtrapolation ( const ext::function< Real(Real)> &  f,
Real  delta_h,
Real  n = Null<Real>() 
)

Richardon Extrapolation

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

Definition at line 46 of file richardsonextrapolation.cpp.

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

Definition at line 55 of file richardsonextrapolation.cpp.

◆ 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

Definition at line 65 of file richardsonextrapolation.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ delta_h_

const Real delta_h_
private

Definition at line 66 of file richardsonextrapolation.hpp.

◆ fdelta_h_

const Real fdelta_h_
private

Definition at line 67 of file richardsonextrapolation.hpp.

◆ n_

const Real n_
private

Definition at line 68 of file richardsonextrapolation.hpp.

◆ f_

const ext::function<Real (Real)> f_
private

Definition at line 69 of file richardsonextrapolation.hpp.