A Monte Carlo transform from one Gaussian distribution to another.
More...
#include <MonteCarloTransform.hpp>
|
| MonteCarloTransform (const std::size_t samples=100000) |
| Constructor. More...
|
|
template<typename InputDist , typename Trans , typename ... NoiseDists, std::enable_if_t<(gaussian_distribution< InputDist > and ... and gaussian_distribution< NoiseDists >) and linearized_function< Trans, 1 > and std::is_invocable_v< Trans, typename DistributionTraits< InputDist >::Mean, typename DistributionTraits< NoiseDists >::Mean... >, int > = 0> |
auto | operator() (const InputDist &x, const Trans &transformation, const NoiseDists &...n) const |
| Perform a Monte Carlo transform from one statistical distribution to another. More...
|
|
template<typename InputDist , typename Trans , typename ... NoiseDists, std::enable_if_t<(gaussian_distribution< InputDist > and ... and gaussian_distribution< NoiseDists >) and linearized_function< Trans, 1 > and std::is_invocable_v< Trans, typename DistributionTraits< InputDist >::Mean, typename DistributionTraits< NoiseDists >::Mean... >, int > = 0> |
auto | transform_with_cross_covariance (const InputDist &x, const Trans &transformation, const NoiseDists &...n) const |
| Perform a Monte Carlo transform, also returning the cross-covariance. More...
|
|
auto | operator() (const InputDist &x, const T &t, const Ts &...ts) const |
| Perform one or more consecutive transforms. More...
|
|
auto | transform_with_cross_covariance (const InputDist &x, const T &t, const Ts &...ts) const |
| Perform one or more consecutive transforms, also returning the cross-covariance. More...
|
|
A Monte Carlo transform from one Gaussian distribution to another.
Uses ideas from Chan, Tony F.; Golub, Gene H.; LeVeque, Randall J. (1979), "Updating Formulae and a Pairwise Algorithm for Computing Sample Variances." Technical Report STAN-CS-79-773, Department of Computer Science, Stanford University. http://i.stanford.edu/pub/cstr/reports/cs/tr/79/773/CS-TR-79-773.pdf
◆ MonteCarloTransform()
OpenKalman::MonteCarloTransform::MonteCarloTransform |
( |
const std::size_t |
samples = 100000 | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
samples | The number of random samples taken from the prior distribution. |
◆ operator()()
template<typename InputDist , typename Trans , typename ... NoiseDists, std::enable_if_t<(gaussian_distribution< InputDist > and ... and gaussian_distribution< NoiseDists >) and linearized_function< Trans, 1 > and std::is_invocable_v< Trans, typename DistributionTraits< InputDist >::Mean, typename DistributionTraits< NoiseDists >::Mean... >, int > = 0>
auto OpenKalman::MonteCarloTransform::operator() |
( |
const InputDist & |
x, |
|
|
const Trans & |
transformation, |
|
|
const NoiseDists &... |
n |
|
) |
| const |
|
inline |
Perform a Monte Carlo transform from one statistical distribution to another.
- Template Parameters
-
InputDist | The prior distribution. |
Trans | The tests on which the transform is based. |
NoiseDists | Zero or more noise distributions. |
- Returns
- The posterior distribution.
◆ transform_with_cross_covariance()
template<typename InputDist , typename Trans , typename ... NoiseDists, std::enable_if_t<(gaussian_distribution< InputDist > and ... and gaussian_distribution< NoiseDists >) and linearized_function< Trans, 1 > and std::is_invocable_v< Trans, typename DistributionTraits< InputDist >::Mean, typename DistributionTraits< NoiseDists >::Mean... >, int > = 0>
auto OpenKalman::MonteCarloTransform::transform_with_cross_covariance |
( |
const InputDist & |
x, |
|
|
const Trans & |
transformation, |
|
|
const NoiseDists &... |
n |
|
) |
| const |
|
inline |
Perform a Monte Carlo transform, also returning the cross-covariance.
- Template Parameters
-
InputDist | The prior distribution. |
Trans | The tests on which the transform is based. |
NoiseDists | Zero or more noise distributions. |
- Returns
- A tuple comprising the posterior distribution and the cross-covariance.
The documentation for this struct was generated from the following file: