|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Integral of a one-dimensional function. More...
#include <gausslobattointegral.hpp>
Inheritance diagram for GaussLobattoIntegral:
Collaboration diagram for GaussLobattoIntegral:Public Member Functions | |
| GaussLobattoIntegral (Size maxIterations, Real absAccuracy, Real relAccuracy=Null< Real >(), bool useConvergenceEstimate=true) | |
Public Member Functions inherited from Integrator | |
| Integrator (Real absoluteAccuracy, Size maxEvaluations) | |
| virtual | ~Integrator ()=default |
| Real | operator() (const std::function< Real(Real)> &f, Real a, Real b) const |
| void | setAbsoluteAccuracy (Real) |
| void | setMaxEvaluations (Size) |
| Real | absoluteAccuracy () const |
| Size | maxEvaluations () const |
| Real | absoluteError () const |
| Size | numberOfEvaluations () const |
| virtual bool | integrationSuccess () const |
Protected Member Functions | |
| Real | integrate (const std::function< Real(Real)> &f, Real a, Real b) const override |
| Real | adaptivGaussLobattoStep (const std::function< Real(Real)> &f, Real a, Real b, Real fa, Real fb, Real is) const |
| Real | calculateAbsTolerance (const std::function< Real(Real)> &f, Real a, Real b) const |
Protected Member Functions inherited from Integrator | |
| void | setAbsoluteError (Real error) const |
| void | setNumberOfEvaluations (Size evaluations) const |
| void | increaseNumberOfEvaluations (Size increase) const |
Protected Attributes | |
| Real | relAccuracy_ |
| const bool | useConvergenceEstimate_ |
Static Protected Attributes | |
| static const Real | alpha_ = std::sqrt(2.0/3.0) |
| static const Real | beta_ = 1.0/std::sqrt(5.0) |
| static const Real | x1_ = 0.94288241569547971906 |
| static const Real | x2_ = 0.64185334234578130578 |
| static const Real | x3_ = 0.23638319966214988028 |
Integral of a one-dimensional function.
Given a target accuracy \( \epsilon \), the integral of a function \( f \) between \( a \) and \( b \) is calculated by means of the Gauss-Lobatto formula
References: This algorithm is a C++ implementation of the algorithm outlined in
W. Gander and W. Gautschi, Adaptive Quadrature - Revisited. BIT, 40(1):84-101, March 2000. CS technical report: ftp.inf.ethz.ch/pub/publications/tech-reports/3xx/306.ps.gz
The original MATLAB version can be downloaded here http://www.inf.ethz.ch/personal/gander/adaptlob.m
Definition at line 51 of file gausslobattointegral.hpp.
| GaussLobattoIntegral | ( | Size | maxIterations, |
| Real | absAccuracy, | ||
| Real | relAccuracy = Null<Real>(), |
||
| bool | useConvergenceEstimate = true |
||
| ) |
Definition at line 36 of file gausslobattointegral.cpp.
|
overrideprotectedvirtual |
Implements Integrator.
Definition at line 45 of file gausslobattointegral.cpp.
Here is the call graph for this function:
|
protected |
Definition at line 114 of file gausslobattointegral.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 56 of file gausslobattointegral.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 67 of file gausslobattointegral.hpp.
|
protected |
Definition at line 68 of file gausslobattointegral.hpp.
|
staticprotected |
Definition at line 69 of file gausslobattointegral.hpp.
|
staticprotected |
Definition at line 69 of file gausslobattointegral.hpp.
|
staticprotected |
Definition at line 69 of file gausslobattointegral.hpp.
|
staticprotected |
Definition at line 69 of file gausslobattointegral.hpp.
|
staticprotected |
Definition at line 69 of file gausslobattointegral.hpp.