|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
The density of a Mixture whose components have been factorized: a read-only view. More...
#include <EmrysFilter/Distributions/Mixture.h>
Public Types | |
| using | ParamsType = MixtureParams<Component_, Allocator_> |
| the parameters it reads | |
| using | ComponentType = Params<Component_> |
| a component | |
| using | SpaceType = typename ParamsType::SpaceType |
| the components' space | |
| using | allocator_type = Allocator_ |
| the parameters' allocator | |
| using | Entry = typename ParamsType::Entry |
| one weighted component | |
| using | const_iterator = typename ParamsType::const_iterator |
| iterates the entries | |
| using | MomentsType = typename ParamsType::MomentsType |
| a mean and covariance together | |
| using | Scalar = typename ParamsType::Scalar |
| the scalar type | |
| using | Index = typename ParamsType::Index |
| Eigen's index type. | |
| using | VectorType = typename ParamsType::VectorType |
| a value, such as a mean | |
| using | DifferenceVectorType = typename ParamsType::DifferenceVectorType |
| a difference | |
| using | MatrixType = typename ParamsType::MatrixType |
| a matrix over differences | |
Public Member Functions | |
| Index | size () const |
| Index | valueDimension () const |
| Index | differenceDimension () const |
| SpaceType const & | space () const |
| allocator_type | get_allocator () const |
| const_iterator | begin () const |
| const_iterator | end () const |
| ParamsType::Entry const & | operator[] (Index i) const |
| Scalar | logTotalWeight () const |
| Scalar | ess () const |
| Index | mostProbable () const |
| ComponentType | collapsed () const |
| MomentsType | moments () const |
| template<typename Derived> | |
| Scalar | logDensity (Eigen::MatrixBase< Derived > const &x) const |
| template<typename Derived> | |
| Scalar | density (Eigen::MatrixBase< Derived > const &x) const |
| template<typename Path> | |
| auto | marginal () const |
| marginal() of the subspace named by the tag path Path; see MixtureParams::marginal(). | |
| template<typename Path> | |
| auto | marginal (Index element) const |
| marginal() of one repetition of a repeated block; see GaussianParams::marginal(element). | |
| template<typename GivenPath, typename Derived> requires (isGaussian<ComponentType>) | |
| auto | conditional (Eigen::MatrixBase< Derived > const &values) const |
Static Public Attributes | |
| static constexpr int | ValueDimensionAtCompileTime = ParamsType::ValueDimensionAtCompileTime |
| the length of a value, or Eigen::Dynamic | |
| static constexpr int | MaxValueDimensionAtCompileTime = ParamsType::MaxValueDimensionAtCompileTime |
| a bound on the length of a value, or Eigen::Dynamic | |
| static constexpr int | DifferenceDimensionAtCompileTime = ParamsType::DifferenceDimensionAtCompileTime |
| the length of a difference and the rows of a covariance, or Eigen::Dynamic | |
| static constexpr int | MaxDifferenceDimensionAtCompileTime = ParamsType::MaxDifferenceDimensionAtCompileTime |
| a bound on the length of a difference, or Eigen::Dynamic | |
| static constexpr bool | IsParams = false |
| a view: it checks its parameters | |
The density of a Mixture whose components have been factorized: a read-only view.
Represents the normalized density
\[ p(x) = \frac{\sum_i w_i \, p_i(x)}{\sum_i w_i}, \]
with \( p_i \) the density of component \( i \), read from its factorization under this view's check (see ComponentTraits).
Obtained from MixtureParams::toDensity(). It checks the source for changes, as its copies do: reading it after the source has changed is a programmer error (decisions.md [view-stamp]). A Mixture must not outlive its source.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
Only the lower triangle of each component covariance is read; the result is symmetric. It allocates nothing sized by the number of components.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |