Table of Contents

Interface ITrapezoidIntegrationPolicy

Namespace
NanoQL.Numerics
Assembly
NanoQL.dll

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

f Func<double, double>

The integrand.

a double

The lower limit.

b double

The upper limit.

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

f Func<double, double>

The integrand.

a double

The lower limit.

b double

The upper limit.

I double

The estimate over N intervals.

N int

The 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.