|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
The uniform distribution over a box in a space. More...
#include <EmrysFilter/Distributions/Uniform.h>
Public Types | |
| using | Scalar = Scalar_ |
| the scalar type | |
| using | Index = Eigen::Index |
| Eigen's index type. | |
| using | SpaceType = Space_ |
| the space the values live in | |
| using | MomentsType = Moments<Space_, Scalar_> |
| a mean and covariance together | |
| using | VectorType = typename MomentsType::VectorType |
| a value | |
| using | MatrixType = typename MomentsType::MatrixType |
| a matrix over differences | |
Public Member Functions | |
| Uniform (Space_ space={}) | |
| Uniform over the whole of space. | |
| Index | valueDimension () const |
| Index | differenceDimension () const |
| Space_ const & | space () const |
| VectorType const & | lower () const |
| VectorType | upper () const |
| VectorType const & | width () const |
| Scalar | logVolume () const |
| template<typename Derived> | |
| bool | contains (Eigen::MatrixBase< Derived > const &x) const |
| template<typename Derived> | |
| Scalar | logDensity (Eigen::MatrixBase< Derived > const &x) const |
| template<typename Derived> | |
| Scalar | density (Eigen::MatrixBase< Derived > const &x) const |
| MomentsType | moments () const |
| template<typename Path> | |
| auto | marginal () const |
| marginal() of the subspace named by the tag path Path (see idx()), in that subspace. | |
| 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> | |
| auto | conditional (Eigen::MatrixBase< Derived > const &values) const |
Static Public Member Functions | |
| template<MatrixExpression Lower, typename UpperDerived> | |
| static std::expected< Uniform, UniformError > | create (Space_ space, Lower &&lower, Eigen::MatrixBase< UpperDerived > const &upper) |
|
template<MatrixExpression Lower, typename UpperDerived> requires internal::SizedByLength<Space_> | |
| static std::expected< Uniform, UniformError > | create (Lower &&lower, Eigen::MatrixBase< UpperDerived > const &upper) |
| create() in the default space. | |
Static Public Attributes | |
| static constexpr int | ValueDimensionAtCompileTime = MomentsType::ValueDimensionAtCompileTime |
| the length of a value, or Eigen::Dynamic | |
| static constexpr int | MaxValueDimensionAtCompileTime = MomentsType::MaxValueDimensionAtCompileTime |
| a bound on the length of a value, or Eigen::Dynamic | |
| static constexpr int | DifferenceDimensionAtCompileTime = MomentsType::DifferenceDimensionAtCompileTime |
| the length of a difference and the rows of a covariance, or Eigen::Dynamic | |
| static constexpr int | MaxDifferenceDimensionAtCompileTime = MomentsType::MaxDifferenceDimensionAtCompileTime |
| a bound on the length of a difference, or Eigen::Dynamic | |
Friends | |
| template<Space, RealScalar> | |
| class | Uniform |
| Marginals build another instantiation from checked parts. | |
The uniform distribution over a box in a space.
Each coordinate \( i \) is uniform on an interval of width \( w_i \) starting at \( \ell_i \), independently, so the density is \( 1 / \prod_i w_i \) inside the box and zero outside.
The space supplies the default box where it can: a Periodic coordinate is uniform over one whole period, and that constructor cannot fail. A Linear coordinate has no default and needs a box, which create() checks, since bounds are often computed at run time. A Periodic coordinate's interval may cross the seam: [3, 3.5] on an angle covers [3, π) and [-π, 3.5 - 2π].
A Uniform is an immutable value that owns its box [checked-factories].
| Space_ | space of the coordinates (see Spaces) |
| Scalar_ | scalar type |
|
inlineexplicit |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinestaticnodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
For a Periodic coordinate these are tangent-space moments about the interval's center. Over a whole period every point is equally a center, so the reported mean is arbitrary and the variance \( p^2 / 12 \) only says the coordinate is unknown.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |