Expand description
Plain Monte Carlo integration over boxes.
See the book entry Monte Carlo and quasi-Monte Carlo integration.
Structs§
- Monte
Carlo Result - The outcome of
monte_carlo.
Functions§
- monte_
carlo - Estimates
∫ fover the boxbounds(one(lower, upper)pair per dimension) fromsamplesuniformly distributed points: the volume times the sample mean off, with its standard error. The error falls like1/√Nwhatever the dimension.seedmakes the result reproducible. - monte_
carlo_ integration - Monte Carlo integration until a target accuracy: samples are drawn in batches of
convergence_tuple.1until the standard error of the estimate falls belowconvergence_tuple.0(an absolute error target), or untilmax_sampleshave been used, in which case the current estimate is returned. Withoutmax_samples, failing to converge within 10⁹ samples is an error (the integrand may have infinite variance).