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

Integral of a 1-dimensional function using the Gauss quadratures method. More...

#include <gaussianquadratures.hpp>

+ Inheritance diagram for GaussianQuadrature:
+ Collaboration diagram for GaussianQuadrature:

Public Member Functions

 GaussianQuadrature (Size n, const GaussianOrthogonalPolynomial &p)
 
template<class F >
Real operator() (const F &f) const
 
Size order () const
 
const Arrayweights ()
 
const Arrayx ()
 

Protected Attributes

Array x_
 
Array w_
 

Detailed Description

Integral of a 1-dimensional function using the Gauss quadratures method.

References: Gauss quadratures and orthogonal polynomials

G.H. Gloub and J.H. Welsch: Calculation of Gauss quadrature rule. Math. Comput. 23 (1986), 221-230

"Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery,

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

Definition at line 48 of file gaussianquadratures.hpp.

Constructor & Destructor Documentation

◆ GaussianQuadrature()

Definition at line 32 of file gaussianquadratures.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

Real operator() ( const F f) const

Definition at line 59 of file gaussianquadratures.hpp.

+ Here is the call graph for this function:

◆ order()

Size order ( ) const

Definition at line 71 of file gaussianquadratures.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ weights()

const Array & weights ( )

Definition at line 72 of file gaussianquadratures.hpp.

+ Here is the caller graph for this function:

◆ x()

const Array & x ( )

Definition at line 73 of file gaussianquadratures.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ x_

Array x_
protected

Definition at line 76 of file gaussianquadratures.hpp.

◆ w_

Array w_
protected

Definition at line 76 of file gaussianquadratures.hpp.