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

A set of one or more column vectors, each representing a statistical mean. More...

#include <forward-class-declarations.hpp>

Inheritance diagram for OpenKalman::Mean< RowCoefficients, NestedMatrix >:
Inheritance graph
[legend]
Collaboration diagram for OpenKalman::Mean< 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< mean< 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>
 Mean (Arg &&arg)
 Construct from a compatible mean.
 
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(from_euclidean< RowCoefficients >(nested_object(std::declval< Arg &&>())))>, int > = 0>
 Mean (Arg &&arg)
 Construct from a compatible Euclidean-transformed typed matrix.
 
template<typename Arg , std::enable_if_t< typed_matrix< Arg > and not euclidean_transformed< Arg > and not mean< Arg > and compares_with< vector_space_descriptor_of_t< Arg, 0 >, RowCoefficients > and compares_with< vector_space_descriptor_of_t< Arg, 1 >, ColumnCoefficients >, int > = 0>
 Mean (Arg &&arg)
 Construct from a compatible typed matrix or Euclidean-transformed mean.
 
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, decltype(wrap_angles< RowCoefficients >(std::declval< Arg >()))>, int > = 0>
 Mean (Arg &&arg)
 Construct from a typed_matrix_nestable.
 
template<typename ... Args, std::enable_if_t< std::conjunction_v< std::is_convertible< Args, const Scalar >... > and((diagonal_matrix< NestedMatrix > and sizeof...(Args)==index_dimension_of< NestedMatrix, 0 >::value) or(sizeof...(Args)==index_dimension_of< NestedMatrix, 0 >::value *index_dimension_of< NestedMatrix, 1 >::value)) and std::is_constructible_v< NestedMatrix, decltype(wrap_angles< RowCoefficients >(std::declval< NestedMatrix >()))>, int > = 0>
 Mean (Args ... args)
 Construct from a list of coefficients.
 
template<typename Arg >
auto & operator= (Arg &&other)
 Assign from a compatible mean.
 
template<typename Arg >
auto & operator= (Arg &&other)
 Assign from a compatible euclidean_transformed.
 
template<typename Arg >
auto & operator= (Arg &&other)
 Assign from a compatible typed_matrix that is not mean or euclidean_transformed.
 
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 Mean &other)
 Increment from another mean.
 
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(not euclidean_transformed< Arg >), int > = 0>
auto & operator+= (Arg &&other)
 Increment from another typed matrix.
 
template<typename Arg , std::enable_if_t< distribution< Arg > and(compares_with< typename DistributionTraits< Arg >::StaticDescriptor, RowCoefficients >), int > = 0>
auto & operator+= (const Arg &arg)
 Add a stochastic value to each column of the mean, based on a distribution.
 
auto & operator-= (const Mean &other)
 Decrement from another mean and wrap result.
 
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(not euclidean_transformed< Arg >), int > = 0>
auto & operator-= (Arg &&other)
 Decrement from another typed matrix and wrap result.
 
template<typename Arg , std::enable_if_t< distribution< Arg > and(compares_with< typename DistributionTraits< Arg >::StaticDescriptor, RowCoefficients >), int > = 0>
auto & operator-= (const Arg &arg)
 Subtract a stochastic value to each column of the mean, based on a distribution.
 
template<typename S , std::enable_if_t< std::is_convertible_v< S, Scalar >, int > = 0>
auto & operator*= (const S s)
 Multiply by a scale factor.
 
template<typename S , std::enable_if_t< std::is_convertible_v< S, Scalar >, int > = 0>
auto & operator/= (const S s)
 Divide by a scale factor.
 

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::Mean< RowCoefficients, NestedMatrix >

A set of one or more column vectors, each representing a statistical mean.

A typed vector.

Unlike OpenKalman::Matrix, the columns of a Mean are untyped. When a Mean is converted to an OpenKalman::Matrix, the columns are assigned type Axis. Example declaration: Mean<std::tuple<Axis, Axis, angle::Radians>, 1, eigen_matrix_t<double, 3, 1>> x; This declares a 3-dimensional vector x, where the coefficients are, respectively, an Axis, an Axis, and an angle::Radians, all of scalar type double. The underlying representation is an Eigen3 column vector.

Template Parameters
DescriptorCoefficient types of the mean (e.g., Axis, Polar).
NestedMatrixThe underlying native matrix or matrix expression.

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