EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::Named< Values > Struct Template Reference

Values named by the tag types Values, in order: struct Maneuver : Named<Cruise, Turn> {};. More...

#include <EmrysFilter/Spaces/Discrete.h>

Static Public Member Functions

static constexpr Eigen::Index cardinality ()
template<typename Value>
static constexpr Eigen::Index index ()

Static Public Attributes

static constexpr int Cardinality = int(sizeof...(Values))
 the number of names
static constexpr int MaxCardinality = Cardinality
 the same: a Named is fixed
template<typename Value>
static constexpr bool contains = (std::is_same_v<Value, Values> || ...)
 Whether Value names one of the values.

Friends

bool operator== (Named const &, Named const &)=default
 Always equal: a Named has no state.

Detailed Description

template<typename... Values>
struct Emrys::Named< Values >

Values named by the tag types Values, in order: struct Maneuver : Named<Cruise, Turn> {};.

The value named Turn has the index index<Turn>(), here 1.

An empty type. The tags must be distinct; any type can be one, and it needs no definition.

Member Function Documentation

◆ cardinality()

template<typename... Values>
constexpr Eigen::Index Emrys::Named< Values >::cardinality ( )
inlinestaticnodiscardconstexpr
Returns
the number of values, Cardinality

◆ index()

template<typename... Values>
template<typename Value>
constexpr Eigen::Index Emrys::Named< Values >::index ( )
inlinestaticnodiscardconstexpr
Returns
the index of the value named Value

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