|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Integrates a vector or scalar function of vector domain. More...
#include <multidimintegrator.hpp>
Inheritance diagram for MultidimIntegral:
Collaboration diagram for MultidimIntegral:Public Member Functions | |
| MultidimIntegral (const std::vector< ext::shared_ptr< Integrator > > &integrators) | |
| Real | operator() (const std::function< Real(const std::vector< Real > &)> &f, const std::vector< Real > &a, const std::vector< Real > &b) const |
Private Member Functions | |
| template<Size depth> | |
| void | spawnFcts () const |
| template<int T_N> | |
| Real | vectorBinder (const std::function< Real(const std::vector< Real > &)> &f, Real z, const std::vector< Real > &a, const std::vector< Real > &b) const |
| template<int nT> | |
| Real | integrate (const std::function< Real(const std::vector< Real > &)> &f, const std::vector< Real > &a, const std::vector< Real > &b) const |
| template<> | |
| Real | vectorBinder (const std::function< Real(const std::vector< Real > &)> &f, Real z, const std::vector< Real > &a, const std::vector< Real > &b) const |
| template<> | |
| void | spawnFcts () const |
Private Attributes | |
| const std::vector< ext::shared_ptr< Integrator > > | integrators_ |
| std::vector< std::function< Real(const std::function< Real(const std::vector< Real > &)> &, const std::vector< Real > &, const std::vector< Real > &) > > | integrationLevelEntries_ |
| std::vector< Real > | varBuffer_ |
Static Private Attributes | |
| static const Size | maxDimensions_ = 15 |
Integrates a vector or scalar function of vector domain.
Uses a collection of arbitrary 1D integrators along each of the dimensions. A template recursion along dimensions avoids calling depth test or virtual functions.
Definition at line 39 of file multidimintegrator.hpp.
|
explicit |
Definition at line 24 of file multidimintegrator.cpp.
| Real operator() | ( | const std::function< Real(const std::vector< Real > &)> & | f, |
| const std::vector< Real > & | a, | ||
| const std::vector< Real > & | b | ||
| ) | const |
f is the integrand function; a and b are the lower and upper integration limit domain for each dimension.
Definition at line 48 of file multidimintegrator.hpp.
Here is the caller graph for this function:
|
private |
Definition at line 157 of file multidimintegrator.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 116 of file multidimintegrator.hpp.
|
private |
Definition at line 127 of file multidimintegrator.hpp.
|
staticprivate |
Definition at line 60 of file multidimintegrator.hpp.
|
private |
Definition at line 85 of file multidimintegrator.hpp.
|
mutableprivate |
Definition at line 105 of file multidimintegrator.hpp.
|
mutableprivate |
Definition at line 110 of file multidimintegrator.hpp.