QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Integrates a vector or scalar function of vector domain. More...
#include <multidimquadrature.hpp>
Classes | |
class | VectorIntegrator |
Public Member Functions | |
GaussianQuadMultidimIntegrator (Size dimension, Size quadOrder, Real mu=0.) | |
Size | order () const |
Integration quadrature order. More... | |
template<class RetType_T > | |
RetType_T | operator() (const ext::function< RetType_T(const std::vector< Real > &arg)> &f) const |
Integrates function f over \( R^{dim} \). More... | |
template<class RetType_T > | |
RetType_T | integrate (const ext::function< RetType_T(const std::vector< Real > &v1)> &f) const |
template<> | |
Real | operator() (const ext::function< Real(const std::vector< Real > &v1)> &f) const |
template<> | |
Real | integrate (const ext::function< Real(const std::vector< Real > &v1)> &f) const |
Private Member Functions | |
template<> | |
Real | scalarIntegrator (const ext::function< Real(const std::vector< Real > &arg1)> &f, const Real mFctr) const |
Terminal integrand; scalar function version. More... | |
template<> | |
std::vector< Real > | vectorIntegratorVR (const ext::function< std::vector< Real >(const std::vector< Real > &arg1)> &f, const Real mFctr) const |
Terminal integrand; vector function version. More... | |
template<> | |
void | spawnFcts () const |
Terminal level: More... | |
Static Private Attributes | |
static const Size | maxDimensions_ = 15 |
Integration entry points generation | |
GaussHermiteIntegration | integral_ |
The actual integrators. More... | |
VectorIntegrator | integralV_ |
std::vector< ext::function< Real(ext::function< Real(const std::vector< Real > &varg2)> f1, const Real r3)> > | integrationEntries_ |
Buffer to allow acces to integrations. We do not know at which. More... | |
std::vector< ext::function< std::vector< Real >(const ext::function< std::vector< Real >(const std::vector< Real > &vvarg2)> &vf1, const Real vr3)> | integrationEntriesVR_ |
Size | dimension_ |
std::vector< Real > | varBuffer_ |
template<Size levelSpawn> | |
void | spawnFcts () const |
Recursive template methods to statically generate (at this. More... | |
template<int intgDepth> | |
Real | scalarIntegrator (const ext::function< Real(const std::vector< Real > &arg1)> &f, const Real mFctr) const |
template<int intgDepth> | |
std::vector< Real > | vectorIntegratorVR (const ext::function< std::vector< Real >(const std::vector< Real > &arg1)> &f, const Real mFctr) const |
Integrates a vector or scalar function of vector domain.
A template recursion along dimensions avoids calling depth test or virtual functions.
Definition at line 48 of file multidimquadrature.hpp.
GaussianQuadMultidimIntegrator | ( | Size | dimension, |
Size | quadOrder, | ||
Real | mu = 0. |
||
) |
dimension | The number of dimensions of the argument of the function we want to integrate. |
quadOrder | Quadrature order. |
mu | Parameter in the Gauss Hermite weight (i.e. points load). |
Definition at line 26 of file multidimquadrature.cpp.
Size order | ( | ) | const |
Integration quadrature order.
Definition at line 87 of file multidimquadrature.hpp.
RetType_T operator() | ( | const ext::function< RetType_T(const std::vector< Real > &arg)> & | f | ) | const |
Integrates function f over \( R^{dim} \).
Definition at line 99 of file multidimquadrature.hpp.
RetType_T integrate | ( | const ext::function< RetType_T(const std::vector< Real > &v1)> & | f | ) | const |
|
private |
Recursive template methods to statically generate (at this.
Definition at line 129 of file multidimquadrature.hpp.
|
private |
Definition at line 145 of file multidimquadrature.hpp.
|
private |
Definition at line 154 of file multidimquadrature.hpp.
Definition at line 189 of file multidimquadrature.hpp.
Definition at line 198 of file multidimquadrature.hpp.
|
private |
Terminal integrand; scalar function version.
Definition at line 218 of file multidimquadrature.hpp.
|
private |
Terminal integrand; vector function version.
Definition at line 218 of file multidimquadrature.hpp.
|
private |
Terminal level:
Definition at line 239 of file multidimquadrature.hpp.
|
staticprivate |
Definition at line 122 of file multidimquadrature.hpp.
|
private |
The actual integrators.
Definition at line 165 of file multidimquadrature.hpp.
|
private |
Definition at line 166 of file multidimquadrature.hpp.
|
mutableprivate |
Buffer to allow acces to integrations. We do not know at which.
Definition at line 174 of file multidimquadrature.hpp.
|
mutableprivate |
Definition at line 178 of file multidimquadrature.hpp.
|
private |
Definition at line 180 of file multidimquadrature.hpp.
|
mutableprivate |
Definition at line 182 of file multidimquadrature.hpp.