The density of a Gaussian in a square-root or information form: a read-only view.
More...
|
|
using | ParamsType = Params_ |
| | the parameters it reads
|
|
using | SpaceType = typename Params_::SpaceType |
| | the space the values live in
|
|
using | Scalar = typename Params_::Scalar |
| | the scalar type
|
|
using | Index = Eigen::Index |
| | Eigen's index type.
|
|
using | VectorType = typename Params_::VectorType |
| | a value, such as the mean
|
|
using | DifferenceVectorType = typename Params_::DifferenceVectorType |
| | a difference, such as a residual
|
|
using | MatrixType = typename Params_::MatrixType |
| | a matrix over differences
|
|
using | MomentsType = typename Params_::MomentsType |
| | the mean and covariance together
|
|
|
static constexpr int | ValueDimensionAtCompileTime = Params_::ValueDimensionAtCompileTime |
| | the length of a value, or Eigen::Dynamic
|
|
static constexpr int | MaxValueDimensionAtCompileTime = Params_::MaxValueDimensionAtCompileTime |
| | a bound on the length of a value, or Eigen::Dynamic
|
|
static constexpr int | DifferenceDimensionAtCompileTime = Params_::DifferenceDimensionAtCompileTime |
| | the length of a difference and the rows of the covariance, or Eigen::Dynamic
|
|
static constexpr int | MaxDifferenceDimensionAtCompileTime = Params_::MaxDifferenceDimensionAtCompileTime |
| | a bound on the length of a difference, or Eigen::Dynamic
|
|
static constexpr bool | IsParams = false |
| | a view: it checks its parameters
|
template<typename Params_>
class Emrys::FormGaussian< Params_ >
The density of a Gaussian in a square-root or information form: a read-only view.
Represents the same density as Gaussian, evaluated from the root its parameters hold or have cached, never from a covariance:
\[ p(x) = (2\pi)^{-n/2} |\Sigma|^{-1/2} \exp\left(-\tfrac{1}{2} w^T w\right), \]
where the parameters whiten the residual \( r = x \boxminus \mu \) to \( w \) with \( w^T w = r^T \Sigma^{-1} r \), and colors standard normals by a root of \( \Sigma \), each with a triangular product or solve.
Obtained from the parameters' toDensity(), which checks the root and, in the information forms, solves for the mean. What can fail in the parameters, a mean, moments, or a marginal of a precision that is not positive definite, cannot fail here, so the four forms' densities are read alike (decisions.md [form-densities]). It checks the parameters for changes, as Gaussian checks a GaussianParams: reading it after they have changed is a programmer error (decisions.md [view-stamp]). It must not outlive its parameters. SqrtGaussian, InfoGaussian, and SqrtInfoGaussian name it [params-and-density].
- Template Parameters
-
- See also
- SqrtGaussianParams::toDensity(), InfoGaussianParams::toDensity(), SqrtInfoGaussianParams::toDensity()