EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::Periodic< Interval, Dimension_, MaxDimension_ > Class Template Reference

Dimension_ coordinates that wrap with a common period, such as angles or DFT bins. More...

#include <EmrysFilter/Spaces/Coordinates.h>

Inheritance diagram for Emrys::Periodic< Interval, Dimension_, MaxDimension_ >:

Public Member Functions

 Periodic (Eigen::Index n)
 n coordinates of a resizable Periodic.
template<typename Derived>
void normalize (Eigen::MatrixBase< Derived > const &block) const
 Wraps every value in block into [lower(), upper()), writing through the const reference (see writable()).
auto difference () const
 The Periodic on [-period()/2, period()/2), with the same size.

Static Public Member Functions

static consteval double lower ()
static consteval double upper ()
static consteval double period ()

Static Public Attributes

static constexpr int FixedValueDimension
 the fixed coordinates (see Space)
static constexpr int ValueDimensionStep
 one coordinate per element if resizable
static constexpr int MaxValueDimension = MaxDimension_
 the largest valid size, or Eigen::Dynamic

Friends

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

Detailed Description

template<PeriodicInterval Interval, int Dimension_ = 1, int MaxDimension_ = Dimension_>
class Emrys::Periodic< Interval, Dimension_, MaxDimension_ >

Dimension_ coordinates that wrap with a common period, such as angles or DFT bins.

Values are kept in [lower(), upper()) and differences in [-period()/2, period()/2): the difference space is the Periodic on that interval, so RadiansPi is its own and Degrees360's is Degrees180. The interval is a template argument, so a fixed-size Periodic is an empty type: struct Bin : Periodic<{.lower = 0.0, .upper = 256.0}> {};. The interval has no default [coordinate-parameters]. The common angles are named RadiansPi, Radians2Pi, Degrees180, and Degrees360.

A Gaussian on a Periodic coordinate is a Gaussian in its tangent space, valid while its standard deviation is small against the period; a spread on the order of the period is better held by particles, a grid, or a mixture [tangent-gaussians].

Member Function Documentation

◆ lower()

template<PeriodicInterval Interval, int Dimension_ = 1, int MaxDimension_ = Dimension_>
consteval double Emrys::Periodic< Interval, Dimension_, MaxDimension_ >::lower ( )
inlinestaticnodiscardconsteval
Returns
the lower end of the interval of values

◆ period()

template<PeriodicInterval Interval, int Dimension_ = 1, int MaxDimension_ = Dimension_>
consteval double Emrys::Periodic< Interval, Dimension_, MaxDimension_ >::period ( )
inlinestaticnodiscardconsteval
Returns
the period, upper() - lower()

◆ upper()

template<PeriodicInterval Interval, int Dimension_ = 1, int MaxDimension_ = Dimension_>
consteval double Emrys::Periodic< Interval, Dimension_, MaxDimension_ >::upper ( )
inlinestaticnodiscardconsteval
Returns
the excluded upper end of the interval of values

Member Data Documentation

◆ FixedValueDimension

template<PeriodicInterval Interval, int Dimension_ = 1, int MaxDimension_ = Dimension_>
int Emrys::Periodic< Interval, Dimension_, MaxDimension_ >::FixedValueDimension
staticconstexpr
Initial value:
=
Dimension_ == Eigen::Dynamic ? 0 : Dimension_

the fixed coordinates (see Space)

◆ ValueDimensionStep

template<PeriodicInterval Interval, int Dimension_ = 1, int MaxDimension_ = Dimension_>
int Emrys::Periodic< Interval, Dimension_, MaxDimension_ >::ValueDimensionStep
staticconstexpr
Initial value:
=
Dimension_ == Eigen::Dynamic ? 1 : 0

one coordinate per element if resizable


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