Function navtk::filtering::monte_carlo_approx
Defined in File utils.hpp
Function Documentation
-
EstimateWithCovariance navtk::filtering::monte_carlo_approx(const EstimateWithCovariance &ec, const std::function<Vector(const Vector&)> &fx, Size num_samples = 100)
Pass samples of a joint Gaussian through an arbitrary function and calculate the ensemble mean and covariance of the result.
- Parameters
ec – First and second moments of an N-state starting distribution.
fx – A function that takes an N-length observation (
x) and maps it to an M-length result.num_samples – Number of samples to pass through fun to generate the statistics.
- Returns
A pair containing an M-length Vector of transformed observations and an MxM Matrix of corresponding covariances.