OpenKalman
|
An adapter for creating a diagonal matrix or tensor. More...
#include <forward-class-declarations.hpp>
Public Types | |
using | Scalar = scalar_type_of_t< NestedObject > |
Public Member Functions | |
template<typename T = NestedObject, std::enable_if_t< std::is_default_constructible_v< T > and(not has_dynamic_dimensions< NestedObject >), int > = 0> | |
constexpr | DiagonalAdapter () |
Default constructor. | |
template<typename Arg > | |
constexpr | DiagonalAdapter (Arg &&arg) |
Construct from a vector, matrix, or other tensor reflecting the diagonal. | |
template<typename Arg > | |
constexpr auto & | operator= (Arg &&arg) |
Assign from another diagonal_matrix. | |
template<typename Arg , std::enable_if_t< diagonal_matrix< Arg > and(dynamic_dimension< Arg, 0 > or dynamic_dimension< NestedObject, 0 > or index_dimension_of< Arg, 0 >::value==dim), int > = 0> | |
auto & | operator+= (Arg &&arg) |
template<typename Arg , std::enable_if_t< diagonal_matrix< Arg > and(dynamic_dimension< Arg, 0 > or dynamic_dimension< NestedObject, 0 > or index_dimension_of< Arg, 0 >::value==dim), int > = 0> | |
auto & | operator-= (Arg &&arg) |
template<typename S , std::enable_if_t< std::is_convertible_v< S, Scalar >, int > = 0> | |
auto & | operator*= (const S s) |
template<typename S , std::enable_if_t< std::is_convertible_v< S, Scalar >, int > = 0> | |
auto & | operator/= (const S s) |
template<typename Arg , std::enable_if_t<(index_dimension_of< Arg, 0 >::value==dim), int > = 0> | |
auto & | operator*= (const DiagonalAdapter< Arg > &arg) |
decltype(auto) | operator- () const & |
decltype(auto) | operator- () const && |
template<typename Arg , typename S , std::enable_if_t< std::is_same_v< std::decay_t< Arg >, DiagonalAdapter > and std::is_convertible_v< S, const scalar_type_of_t< Arg >>> > | |
decltype(auto) friend | operator* (Arg &&arg, S s) |
template<typename Arg , typename S , std::enable_if_t< std::is_same_v< std::decay_t< Arg >, DiagonalAdapter > and std::is_convertible_v< S, const scalar_type_of_t< Arg >>> > | |
decltype(auto) friend | operator* (S s, Arg &&arg) |
template<typename Arg , typename S , std::enable_if_t< std::is_same_v< std::decay_t< Arg >, DiagonalAdapter > and std::is_convertible_v< S, const scalar_type_of_t< Arg >>> > | |
decltype(auto) friend | operator/ (Arg &&arg, S s) |
![]() | |
constexpr | AdapterBase () |
Default constructor. | |
constexpr | AdapterBase (Arg &&arg, typename std::enable_if< std::is_constructible< NestedObject, Arg && >::value >::type *=0) |
Construct from a compatible indexible type. | |
constexpr NestedObject & | nested_object () & |
Get the nested object. | |
constexpr const NestedObject & | nested_object () const & |
constexpr NestedObject && | nested_object () && |
constexpr const NestedObject && | nested_object () const && |
constexpr auto | operator[] (const Indices &indices) & |
Access a component at a set of indices. More... | |
constexpr auto | operator[] (const Indices &indices) && |
constexpr auto | operator[] (const Indices &indices) const & |
constexpr auto | operator[] (const Indices &indices) const && |
Additional Inherited Members | |
![]() | |
constexpr AdapterBase & | operator= (Arg &&arg) |
Assign from another compatible indexible object. | |
An adapter for creating a diagonal matrix or tensor.
The matrix is guaranteed to be diagonal. Implicit conversions are available from any diagonal_matrix of compatible size.
NestedMatrix | A column vector expression defining the diagonal elements. indexible_object_traits outside the diagonal are automatically 0. |