EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::Composite< Blocks > Class Template Reference

The concatenation of Blocks, any number of them resizable. More...

#include <EmrysFilter/Spaces/Composite.h>

Inheritance diagram for Emrys::Composite< Blocks >:

Public Member Functions

 Composite (Blocks... blocks)
 The concatenation of blocks, with their parameters and sizes.
template<std::size_t I>
auto const & block () const
template<std::size_t I>
auto & block ()
Eigen::Index valueDimension () const
template<std::size_t I>
Eigen::Index offset () const
void resize (Eigen::Index n)
 Resizes the composite's only resizable block, at any depth, so the composite has n coordinates.
template<typename Derived>
requires ((internal::HasNormalize<Blocks> || ...))
void normalize (Eigen::MatrixBase< Derived > const &rows) const
 Normalizes each block's rows; a composite of blocks without normalize() has none.
template<typename X, typename D, typename Out>
requires ((internal::HasPlus<Blocks> || ...))
void plus (Eigen::MatrixBase< X > const &x, Eigen::MatrixBase< D > const &d, Eigen::MatrixBase< Out > const &out) const
 \( x \boxplus \delta \) block by block, for a composite with a block that has its own plus(); see Emrys::plus().
template<typename A, typename B, typename Out>
requires ((internal::HasMinus<Blocks> || ...))
void minus (Eigen::MatrixBase< A > const &a, Eigen::MatrixBase< B > const &b, Eigen::MatrixBase< Out > const &out) const
 \( a \boxminus b \) block by block, for a composite with a block that has its own minus(); see Emrys::minus().
Composite< DifferenceSpace< Blocks >... > difference () const
 The composite of the blocks' difference spaces, with their sizes.

Static Public Attributes

static constexpr int FixedValueDimension
 the blocks' fixed coordinates together
static constexpr int ValueDimensionStep = strides()
 Zero if fixed; otherwise the greatest common divisor of its resizable blocks' strides, which every change in its value dimension is a multiple of.
static constexpr int MaxValueDimension
 The sum of the blocks' bounds, or Eigen::Dynamic if any is unbounded.

Friends

bool operator== (Composite const &, Composite const &)=default
 Equal when every stored parameter and size is; a fixed-size Composite is always equal.

Detailed Description

template<Space... Blocks>
class Emrys::Composite< Blocks >

The concatenation of Blocks, any number of them resizable.

Nesting a named composite names a range of coordinates; storage is always the flat concatenation. Each block's offset is the total size of the blocks before it, so a block after a resizable one has its offset only at run time, from idx<Path>(space). A composite of empty blocks, such as any fixed-size composite of the coordinate types, is itself an empty type, so it costs a distribution nothing.

A composite with one resizable block, at any depth, has resize(n). One with several has none, since a length does not say how to split it among them: its blocks are resized through block(), or through a distribution's insert() and erase().

Member Function Documentation

◆ block() [1/2]

template<Space... Blocks>
template<std::size_t I>
auto & Emrys::Composite< Blocks >::block ( )
inlinenodiscard
Returns
block I, to resize it

◆ block() [2/2]

template<Space... Blocks>
template<std::size_t I>
auto const & Emrys::Composite< Blocks >::block ( ) const
inlinenodiscard
Returns
block I

◆ difference()

template<Space... Blocks>
Composite< DifferenceSpace< Blocks >... > Emrys::Composite< Blocks >::difference ( ) const
inlinenodiscard

The composite of the blocks' difference spaces, with their sizes.

It keeps no tags, the blocks' or its own, even where every block is linear.

◆ offset()

template<Space... Blocks>
template<std::size_t I>
Eigen::Index Emrys::Composite< Blocks >::offset ( ) const
inlinenodiscard
Returns
the offset of block I's first coordinate

◆ valueDimension()

template<Space... Blocks>
Eigen::Index Emrys::Composite< Blocks >::valueDimension ( ) const
inlinenodiscard
Returns
the number of coordinates: the blocks' sizes together

Member Data Documentation

◆ FixedValueDimension

template<Space... Blocks>
int Emrys::Composite< Blocks >::FixedValueDimension
staticconstexpr
Initial value:
=
(Blocks::FixedValueDimension + ...)

the blocks' fixed coordinates together

◆ MaxValueDimension

template<Space... Blocks>
int Emrys::Composite< Blocks >::MaxValueDimension
staticconstexpr
Initial value:
=
((Blocks::MaxValueDimension == Eigen::Dynamic) || ...) ? Eigen::Dynamic : (Blocks::MaxValueDimension + ...)

The sum of the blocks' bounds, or Eigen::Dynamic if any is unbounded.


The documentation for this class was generated from the following file: