OpenKalman
Public Types | Public Member Functions | Protected Types | Static Protected Member Functions | List of all members
OpenKalman::EuclideanMean< RowCoefficients, NestedMatrix > Struct Template Reference

Similar to a Mean, but the coefficients are transformed into Euclidean space, based on their type. More...

#include <forward-class-declarations.hpp>

Inheritance diagram for OpenKalman::EuclideanMean< RowCoefficients, NestedMatrix >:
Inheritance graph
[legend]
Collaboration diagram for OpenKalman::EuclideanMean< RowCoefficients, NestedMatrix >:
Collaboration graph
[legend]

Public Types

using Scalar = scalar_type_of_t< NestedMatrix >
 Scalar type for this matrix.
 

Public Member Functions

template<typename Arg , std::enable_if_t< euclidean_transformed< Arg > and(compares_with< vector_space_descriptor_of_t< Arg, 0 >, RowCoefficients >) and(compares_with< vector_space_descriptor_of_t< Arg, 1 >, ColumnCoefficients >) and std::is_constructible_v< NestedMatrix, decltype(nested_object(std::declval< Arg &&>()))>, int > = 0>
 EuclideanMean (Arg &&arg)
 Construct from a compatible Euclidean-transformed matrix.
 
template<typename Arg , std::enable_if_t< typed_matrix< Arg > and(not euclidean_transformed< Arg >) and(compares_with< vector_space_descriptor_of_t< Arg, 0 >, RowCoefficients >) and(compares_with< vector_space_descriptor_of_t< Arg, 1 >, ColumnCoefficients >) and std::is_constructible_v< NestedMatrix, decltype(to_euclidean< RowCoefficients >(nested_object(std::declval< Arg &&>())))>, int > = 0>
 EuclideanMean (Arg &&arg)
 Construct from a compatible non-Euclidean-transformed typed matrix.
 
template<typename Arg , std::enable_if_t< typed_matrix_nestable< Arg > and(index_dimension_of< Arg, 0 >::value==index_dimension_of< NestedMatrix, 0 >::value) and(index_dimension_of< Arg, 1 >::value==index_dimension_of< NestedMatrix, 1 >::value) and std::is_constructible_v< NestedMatrix, Arg &&>, int > = 0>
 EuclideanMean (Arg &&arg)
 Construct from compatible typed_matrix_nestable object.
 
template<typename Arg >
auto & operator= (Arg &&other)
 Assign from a compatible typed_matrix. More...
 
template<typename Arg >
auto & operator= (Arg &&other)
 Assign from a compatible typed_matrix. More...
 
template<typename Arg , std::enable_if_t< typed_matrix_nestable< Arg > and std::is_assignable_v< std::add_lvalue_reference_t< NestedMatrix >, Arg &&>, int > = 0>
auto & operator= (Arg &&arg)
 Assign from a compatible typed_matrix_nestable.
 
auto & operator+= (const EuclideanMean &other)
 Increment from another EuclideanMean.
 
template<typename Arg , std::enable_if_t< typed_matrix< Arg > and compares_with< vector_space_descriptor_of_t< Arg, 0 >, RowCoefficients > and compares_with< vector_space_descriptor_of_t< Arg, 1 >, ColumnCoefficients > and(coordinates::euclidean_pattern< RowCoefficients > or euclidean_transformed< Arg >), int > = 0>
auto & operator+= (Arg &&other)
 Increment from another typed matrix.
 
template<typename Arg , std::enable_if_t< distribution< Arg > and coordinates::euclidean_pattern< RowCoefficients > and(compares_with< typename DistributionTraits< Arg >::StaticDescriptor, RowCoefficients >), int > = 0>
auto & operator+= (const Arg &arg)
 Add a stochastic value to each column of the matrix, based on a distribution.
 
auto & operator-= (const EuclideanMean &other)
 Decrement from another EuclideanMean.
 
template<typename Arg , std::enable_if_t< typed_matrix< Arg > and compares_with< vector_space_descriptor_of_t< Arg, 0 >, RowCoefficients >and compares_with< vector_space_descriptor_of_t< Arg, 1 >, ColumnCoefficients >and(coordinates::euclidean_pattern< RowCoefficients > or euclidean_transformed< Arg >), int > = 0>
auto & operator-= (Arg &&other)
 Decrement from another typed matrix.
 
template<typename Arg , std::enable_if_t< distribution< Arg > and coordinates::euclidean_pattern< RowCoefficients > and(compares_with< typename DistributionTraits< Arg >::StaticDescriptor, RowCoefficients >), int > = 0>
auto & operator-= (const Arg &arg)
 Subtract a stochastic value to each column of the matrix, based on a distribution.
 

Protected Types

using ColumnCoefficients = Dimensions< index_dimension_of_v< NestedMatrix, 1 > >
 

Static Protected Member Functions

template<typename C = RowCoefficients, typename Arg >
static auto make (Arg &&arg)
 

Detailed Description

template<typename RowCoefficients, typename NestedMatrix>
struct OpenKalman::EuclideanMean< RowCoefficients, NestedMatrix >

Similar to a Mean, but the coefficients are transformed into Euclidean space, based on their type.

Means containing angles should be converted to EuclideanMean before taking an average or weighted average. Example declaration: EuclideanMean<std::tuple<Axis, Axis, angle::Radians>, 1, eigen_matrix_t<double, 4, 1>> x; This declares a 3-dimensional mean x, where the coefficients are, respectively, an Axis, an Axis, and an angle::Radians, all of scalar type double. The underlying representation is a four-dimensional vector in Euclidean space, with the last two of the dimensions representing the angle::Radians coefficient transformed to x and y locations on a unit circle associated with the angle::Radians-type coefficient.

Template Parameters
DescriptorA set of coefficients (e.g., Axis, angle::Radians, Polar, etc.)
NestedMatrixThe underlying native matrix or matrix expression.

Member Function Documentation

◆ operator=() [1/2]

template<typename RowCoefficients, typename NestedMatrix>
template<typename Arg >
auto& OpenKalman::EuclideanMean< RowCoefficients, NestedMatrix >::operator= ( Arg &&  other)
inline

Assign from a compatible typed_matrix.

This is operable where no tests to Euclidean space is required.

◆ operator=() [2/2]

template<typename RowCoefficients, typename NestedMatrix>
template<typename Arg >
auto& OpenKalman::EuclideanMean< RowCoefficients, NestedMatrix >::operator= ( Arg &&  other)
inline

Assign from a compatible typed_matrix.

This is operable where a tests to Euclidean space is required.


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