EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Sampling.h File Reference

Drawing samples: SamplesWithLogDensity and SampleWithLogDensity, the Gaussian draws drawSamples(), drawSamplesWithLogDensity(), and drawSample() and drawSampleWithLogDensity(), the one-at-a-time draws that allocate nothing for a bounded space [allocation], and the internal standard normal and uniform draws. More...

#include <algorithm>
#include <concepts>
#include <random>
#include <Eigen/Cholesky>
#include <EmrysFilter/Distributions/Gaussian.h>
#include <EmrysFilter/Core/Macros.h>
#include <EmrysFilter/Core/Multiply.h>
#include <EmrysFilter/Core/Solve.h>
#include <EmrysFilter/Distributions/SampleSet.h>

Go to the source code of this file.

Classes

struct  Emrys::SamplesWithLogDensity< Space, Scalar >
 Samples in Space together with the log of the density they were drawn from, evaluated at each. More...
struct  Emrys::SampleWithLogDensity< Space, Scalar >
 One sample in Space, in a vector sized by the space, together with the log of the density it was drawn from, evaluated at it: what drawSampleWithLogDensity() returns, so that a bounded space allocates nothing [allocation]. More...

Functions

template<typename Scalar, typename Space, std::uniform_random_bit_generator G>
SampleSet< Space, Scalar > Emrys::drawSamples (Gaussian< Space, Scalar > const &gaussian, Eigen::Index n, G &rng)
template<typename Scalar, typename Space, std::uniform_random_bit_generator G>
Moments< Space, Scalar >::VectorType Emrys::drawSample (Gaussian< Space, Scalar > const &gaussian, G &rng)
template<typename Scalar, typename Space, std::uniform_random_bit_generator G>
SamplesWithLogDensity< Space, Scalar > Emrys::drawSamplesWithLogDensity (Gaussian< Space, Scalar > const &gaussian, Eigen::Index n, G &rng)
template<typename Scalar, typename Space, std::uniform_random_bit_generator G>
SampleWithLogDensity< Space, Scalar > Emrys::drawSampleWithLogDensity (Gaussian< Space, Scalar > const &gaussian, G &rng)

Detailed Description

Drawing samples: SamplesWithLogDensity and SampleWithLogDensity, the Gaussian draws drawSamples(), drawSamplesWithLogDensity(), and drawSample() and drawSampleWithLogDensity(), the one-at-a-time draws that allocate nothing for a bounded space [allocation], and the internal standard normal and uniform draws.

A draw's root is the default one of Roots.h. The other distributions' draws are in their own headers. The generator is the caller's and the draws come from the standard distributions, so a seed fixes them within one standard library only (decisions.md [random-draws]). Read GaussianForm.h next.