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

Integral of a one-dimensional function. More...

#include <ql/math/integrals/filonintegral.hpp>

Public Types

enum  Type { Sine , Cosine }

Public Member Functions

 FilonIntegral (Type type, Real t, Size intervals)

Protected Member Functions

Real integrate (const std::function< Real(Real)> &f, Real a, Real b) const override

Detailed Description

Integral of a one-dimensional function.

Given a number \( N \) of intervals, the integral of a function \( f \) between \( a \) and \( b \) is calculated by means of Filon's sine and cosine integrals

References: Abramowitz, M. and Stegun, I. A. (Eds.). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 890-891, 1972.

Tests
the correctness of the result is tested by checking it against known good values.