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

#include <piecewiseintegral.hpp>

+ Inheritance diagram for PiecewiseIntegral:
+ Collaboration diagram for PiecewiseIntegral:

Public Member Functions

 PiecewiseIntegral (ext::shared_ptr< Integrator > integrator, std::vector< Real > criticalPoints, bool avoidCriticalPoints=true)
 
- Public Member Functions inherited from Integrator
 Integrator (Real absoluteAccuracy, Size maxEvaluations)
 
virtual ~Integrator ()=default
 
Real operator() (const ext::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 ext::function< Real(Real)> &f, Real a, Real b) const override
 
- Protected Member Functions inherited from Integrator
void setAbsoluteError (Real error) const
 
void setNumberOfEvaluations (Size evaluations) const
 
void increaseNumberOfEvaluations (Size increase) const
 

Private Member Functions

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

Private Attributes

const ext::shared_ptr< Integratorintegrator_
 
std::vector< RealcriticalPoints_
 
const Real eps_
 

Detailed Description

Definition at line 38 of file piecewiseintegral.hpp.

Constructor & Destructor Documentation

◆ PiecewiseIntegral()

PiecewiseIntegral ( ext::shared_ptr< Integrator integrator,
std::vector< Real criticalPoints,
bool  avoidCriticalPoints = true 
)

Definition at line 26 of file piecewiseintegral.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ integrate()

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

Implements Integrator.

Definition at line 66 of file piecewiseintegral.hpp.

+ Here is the call graph for this function:

◆ integrate_h()

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

Definition at line 57 of file piecewiseintegral.hpp.

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

Member Data Documentation

◆ integrator_

const ext::shared_ptr<Integrator> integrator_
private

Definition at line 50 of file piecewiseintegral.hpp.

◆ criticalPoints_

std::vector<Real> criticalPoints_
private

Definition at line 51 of file piecewiseintegral.hpp.

◆ eps_

const Real eps_
private

Definition at line 52 of file piecewiseintegral.hpp.