|
|
using | Scalar = Scalar_ |
| | the scalar type
|
|
using | Index = Eigen::Index |
| | Eigen's index type.
|
|
using | SpaceType = Space_ |
| | the space the mean lives in
|
|
using | VectorType = ValueVector<Space_, Scalar> |
| | a value, such as the mean
|
|
using | DifferenceVectorType = DifferenceVector<Space_, Scalar> |
| | a difference, such as a residual
|
|
using | MatrixType = DifferenceMatrix<Space_, Space_, Scalar> |
| | a matrix over differences, such as the covariance
|
|
|
| Moments (Index valueDimension, Index differenceDimension) |
| | Constructs moments with valueDimension coordinates in the mean and differenceDimension in the covariance, with uninitialized contents.
|
|
| Moments (Space_ const &space) |
| | Constructs moments sized for space, with uninitialized contents.
|
| template<MatrixExpression Mean, CovarianceExpression Cov> |
| | Moments (Mean &&mean, Cov &&cov) |
| | Constructs moments from mean and cov, moving either one passed as an rvalue of the stored type.
|
| Index | valueDimension () const |
| Index | differenceDimension () const |
| void | resize (Index valueDimension, Index differenceDimension) |
| | Resizes the mean to valueDimension coordinates and the covariance to differenceDimension rows and columns.
|
| void | resize (Space_ const &space) |
| | Resizes the mean and covariance for space.
|
| VectorType const & | mean () const |
| MatrixType const & | covarianceLower () const |
| VectorType & | mean () |
| MatrixType & | covarianceLower () |
| template<typename Path> |
| auto | mean () const |
| template<typename Path> |
| auto | covarianceLower () const |
| template<typename RowPath, typename ColPath> |
| auto | covarianceLower () const |
| template<typename Path> |
| decltype(auto) | mean () |
| template<typename Path> |
| decltype(auto) | covarianceLower () |
template<Space Space_, RealScalar Scalar_ = double>
class Emrys::Moments< Space_, Scalar_ >
First and second moments (mean and covariance) of a distribution.
The mean is a value in the space, with valueDimension() coordinates, and the covariance is over its differences, with differenceDimension() rows and columns (see Spaces). See covariance matrix.
- Template Parameters
-
| Space_ | space of the mean (see Spaces), which sets the dimensions and the storage bounds. The space is part of the type only: none is stored, and the mean is not normalized. |
| Scalar_ | scalar type, double by default |
No invariants are enforced: the covariance is not required to be symmetric or positive definite. Like Eigen matrices, fixed-size Moments are uninitialized by default. The covariance is read through covarianceLower(), the name every type with a stored covariance gives it, since what reads it reads only the lower triangle.
template<Space Space_, RealScalar Scalar_ = double>
template<MatrixExpression Mean, CovarianceExpression Cov>
| Emrys::Moments< Space_, Scalar_ >::Moments |
( |
Mean && | mean, |
|
|
Cov && | cov ) |
|
inline |
Constructs moments from mean and cov, moving either one passed as an rvalue of the stored type.
cov may be a diagonal, its variances.