Skip to content

a-szymanska/mc-integrate-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monte Carlo integration for C++

Single-header C++ library for Monte Carlo (and not only) integration with support for multidimensional integrals and optional multithreading for faster computation.

Integration methods

Monte Carlo methods

  • integrate_MC - integration in 1D with Vegas optimisation
  • integrate_MC_ndim - integration for multidimensional integrals
  • integrate_MC_highdim - integration for multidimensional integrals, optimised for large number of dimensions
  • integrate_MC_dist - integration with importance sampling

See include/integrate_mc.hpp.

Quadrature methods

  • integrate_trapezoid - trapezoidal method with adaptive box partition
  • integrate_simpson - Simpson's 1/3 trapezoidal method with adaptive box partition

See include/integrate_quadrature.hpp.

Get started

Build

To configure the project and compile tests run:

./build.sh

Usage

To bundle the library into a single header:

./amalgamate.sh

To use the library in your own project download the generated all-in-one header in mc_integrate_cpp.hpp.

Examples

See the tests/ directory for example usage of all the integration functions.

About

Lightweight C++ library for Monte Carlo integration with support for multidimensional integrals.

Topics

Resources

License

Stars

Watchers

Forks

Contributors