The package is intended to provide utilities to unit test sampling algorithms.
In particular, when developing Monte Carlo particle transport codes, one needs
to write procedures to sample a large number of complex distributions that
describe different physical interactions (various types of scattering, fissions etc.).
The models are usually well described by differential cross-sections
This package provides two components to enable unit testing of sampling algorithms.
- An
universal sampler
which can draw samples from an arbitrary shape function that describes the continuous 1D distribution on a bounded support. - A selection of two-sample statistical tests to verify that two samples were drawn from the same distribution.
Thus one can use the universal sampler
to (inefficiently) generate reference
set of samples from a shape function and compare them against the 'production'
algorithm.
The package is using Katex to render equations as the
result to compile documentation locally extra flags need to be provided to cargo
:
export RUSTDOCFLAGS="--html-in-header <path-to-repo>/katex-header.html"
To compile docs from the root of the repositry run::
RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps