Integral of a one-dimensional function. More...
#include <ql/math/integrals/segmentintegral.hpp>
Inherits Integrator.
Public Member Functions | |
| SegmentIntegral (Size intervals) | |
Public Member Functions inherited from Integrator | |
| 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 | |
| virtual Real | integrate (const boost::function< Real(Real)> &f, Real a, Real b) const |
Protected Member Functions inherited from Integrator | |
| 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 |
Integral of a one-dimensional function.
Given a number
of intervals, the integral of a function
between
and
is calculated by means of the trapezoid formula
where
,
, and
with
.