QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Types | Public Member Functions | Protected Member Functions | List of all members
FilonIntegral Class Reference

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

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

Inherits Integrator.

Public Types

enum  Type { Sine, Cosine }
 

Public Member Functions

 FilonIntegral (Type type, Real t, Size intervals)
 

Protected Member Functions

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

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.