QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
MultidimIntegral Class Reference

Integrates a vector or scalar function of vector domain. More...

#include <ql/experimental/math/multidimintegrator.hpp>

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

Detailed Description

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.

This class generalizes to an arbitrary number of dimensions the functionality in class TwoDimensionalIntegral
Examples
MultidimIntegral.cpp.

Member Function Documentation

◆ operator()()

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.