QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.5
Public Member Functions | List of all members
MultidimIntegral Class Reference

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

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

Inherited by IntegrationBase< MultidimIntegral >.

Public Member Functions

 MultidimIntegral (const std::vector< boost::shared_ptr< Integrator > > &integrators)
 
Real operator() (const boost::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

Member Function Documentation

Real operator() ( const boost::function< Real(const std::vector< Real > &)> &  f,
const std::vector< Real > &  a,
const std::vector< Real > &  b 
) const
Parameters
fIntegrand function.
aLower integration limit domain for each dimension.
bUpper integration limit domain for each dimension.