Integral of a one-dimensional function. More...
#include <ql/math/integrals/gausslobattointegral.hpp>
Inherits Integrator.
Public Member Functions | |
GaussLobattoIntegral (Size maxIterations, Real absAccuracy, Real relAccuracy=Null< Real >(), bool useConvergenceEstimate=true) | |
![]() | |
Integrator (Real absoluteAccuracy, Size maxEvaluations) | |
Real | operator() (const boost::function< Real(Real)> &f, Real a, Real b) const |
Real | absoluteError () const |
Size | numberOfEvaluations () const |
virtual bool | integrationSuccess () const |
void | setAbsoluteAccuracy (Real) |
void | setMaxEvaluations (Size) |
Real | absoluteAccuracy () const |
Size | maxEvaluations () const |
Protected Member Functions | |
Real | integrate (const boost::function< Real(Real)> &f, Real a, Real b) const |
Real | adaptivGaussLobattoStep (const boost::function< Real(Real)> &f, Real a, Real b, Real fa, Real fb, Real is) const |
Real | calculateAbsTolerance (const boost::function< Real(Real)> &f, Real a, Real b) const |
![]() | |
virtual Real | integrate (const boost::function< Real(Real)> &f, Real a, Real b) const =0 |
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_ |
static const Real | beta_ |
static const Real | x1_ |
static const Real | x2_ |
static const Real | x3_ |
Integral of a one-dimensional function.
Given a target accuracy , the integral of a function
between
and
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