Theoretica
A C++ numerical and automatic mathematical library
|
Monte Carlo methods. More...
#include "./prng.h"
#include "./quasirandom.h"
#include "./sampling.h"
#include "../algebra/algebra_types.h"
Go to the source code of this file.
Namespaces | |
theoretica | |
Main namespace of the library which contains all functions and objects. | |
Functions | |
real | theoretica::integral_crude (real_function f, real a, real b, PRNG &g, unsigned int N=1000) |
Approximate an integral by using Crude Monte Carlo integration. More... | |
template<unsigned int S> | |
real | theoretica::integral_crude (real(*f)(vec< real, S >), vec< vec2, S > extremes, PRNG &g, unsigned int N=1000) |
Approximate an integral by using Crude Monte Carlo integration. More... | |
real | theoretica::integral_quasi_crude (real_function f, real a, real b, unsigned int N=1000) |
Approximate an integral by using Crude Quasi-Monte Carlo integration by sampling from the Weyl sequence. More... | |
template<unsigned int S> | |
real | theoretica::integral_quasi_crude (real(*f)(vec< real, S >), vec< vec2, S > extremes, unsigned int N, vec< real, S > alpha) |
Approximate an integral by using Crude Quasi-Monte Carlo integration by sampling from the Weyl sequence. More... | |
template<unsigned int S> | |
real | theoretica::integral_quasi_crude (real(*f)(vec< real, S >), vec< vec2, S > extremes, unsigned int N=1000, real alpha=0) |
Approximate an integral by using Crude Quasi-Monte Carlo integration by sampling from the Weyl sequence. More... | |
real | theoretica::integral_hom (real_function f, real a, real b, real c, real d, PRNG &g, unsigned int N=1000) |
Approximate an integral by using Hit-or-miss Monte Carlo integration. More... | |
real | theoretica::integral_hom (real_function f, real a, real b, real f_max, PRNG &g, unsigned int N=1000) |
Approximate an integral by using Hit-or-miss Monte Carlo integration. More... | |
real | theoretica::integral_quasi_hom (real_function f, real a, real b, real c, real d, unsigned int N=1000) |
Approximate an integral by using Hit-or-miss Quasi-Monte Carlo integration, sampling points from the Weyl bi-dimensional sequence. More... | |
real | theoretica::integral_quasi_hom (real_function f, real a, real b, real f_max, unsigned int N=1000) |
Approximate an integral by using Hit-or-miss Quasi-Monte Carlo integration, sampling points from the Weyl bi-dimensional sequence. More... | |
real | theoretica::integral_hom_2d (real(*f)(real, real), real a, real b, real c, real d, real f_max, PRNG &g, unsigned int N=1000) |
Use the Hit-or-Miss Monte Carlo method to approximate a double integral. More... | |
real | theoretica::integral_impsamp (real_function f, real_function g, real_function Ginv, PRNG &gen, unsigned int N=1000) |
Approximate an integral by using Crude Monte Carlo integration with importance sampling. More... | |
real | theoretica::integral_quasi_impsamp (real_function f, real_function g, real_function Ginv, unsigned int N=1000) |
Approximate an integral by using Crude Quasi-Monte Carlo integration with importance sampling, using the Weyl sequence. More... | |
template<typename Vector = std::vector<real>, typename Function = std::function<real(vec<real>)>> | |
Vector | theoretica::sample_mc (Function f, std::vector< pdf_sampler > &rv, unsigned int N) |
Generate a Monte Carlo sample of values of a given function of arbitrary variables following the given distributions. More... | |
Monte Carlo methods.