Interface ITrapezoidIntegrationPolicy
The concept of QuantLib's trapezoid integration policies (Default, MidPoint): one refinement of an
estimate, and the factor by which it multiplies the number of intervals.
public interface ITrapezoidIntegrationPolicy
Methods
InitialEstimate(Func<double, double>, double, double)
The one-interval estimate the refinements start from, and the number of evaluations it takes. The default is
QuantLib's start for every policy, the trapezoid's (trapezoidintegral.hpp:62-64); a policy whose
refinement doesn't refine the trapezoid overrides it.
public static IntegrationResult InitialEstimate(Func<double, double> f, double a, double b)
Parameters
Returns
- IntegrationResult
The estimate and its number of evaluations.
Integrate(Func<double, double>, double, double, double, int)
The refined estimate over N intervals times the policy's factor.
public static abstract double Integrate(Func<double, double> f, double a, double b, double I, int N)
Parameters
fFunc<double, double>The integrand.
adoubleThe lower limit.
bdoubleThe upper limit.
IdoubleThe estimate over
Nintervals.NintThe number of intervals of
I.
Returns
- double
The refined estimate.
NbEvalutions()
The factor by which a refinement multiplies the number of intervals.
public static abstract int NbEvalutions()
Returns
- int
The factor; a refinement evaluates the integrand N·(factor − 1) times.