16 #ifndef OPENKALMAN_EIGEN_TRAITS_MATRIXWRAPPER_HPP 17 #define OPENKALMAN_EIGEN_TRAITS_MATRIXWRAPPER_HPP 19 #include <type_traits> 24 template<
typename XprType>
30 using NestedXpr =
typename Eigen::MatrixWrapper<XprType>::NestedExpressionType;
35 template<
typename Arg,
typename N>
42 template<
typename Arg>
43 static NestedXpr nested_object(Arg&& arg)
45 if constexpr (std::is_lvalue_reference_v<NestedXpr>)
46 return const_cast<NestedXpr
>(std::forward<Arg>(arg).nestedExpression());
48 return static_cast<NestedXpr
>(std::forward<Arg>(arg).nestedExpression());
52 template<
typename Arg>
53 static constexpr
auto get_constant(
const Arg& arg)
59 template<
typename Arg>
60 static constexpr
auto get_constant_diagonal(
const Arg& arg)
62 return constant_diagonal_value {arg.nestedExpression()};
66 template<applicability b>
67 static constexpr
bool one_dimensional = OpenKalman::one_dimensional<XprType, b>;
70 template<applicability b>
71 static constexpr
bool is_square = square_shaped<XprType, b>;
74 template<triangle_type t>
75 static constexpr
bool triangle_type_value = triangular_matrix<XprType, t>;
78 static constexpr
bool is_triangular_adapter =
false;
81 static constexpr
bool is_hermitian = hermitian_matrix<XprType, applicability::permitted>;
84 static constexpr data_layout layout = layout_of_v<XprType>;
Definition: basics.hpp:41
Definition: eigen-comma-initializers.hpp:20
decltype(auto) constexpr get_pattern_collection(T &&t)
Get the patterns::pattern_collection associated with indexible object T.
Definition: get_pattern_collection.hpp:36
Definition: object_traits.hpp:38
Trait object providing get and set routines.
Definition: eigen-forward-declarations.hpp:502
constexpr auto constant_value(T &&t)
The constant value associated with a constant_object or constant_diagonal_object. ...
Definition: constant_value.hpp:37
constexpr bool one_dimensional
Specifies that a type is one-dimensional in each of the first N indices.
Definition: one_dimensional.hpp:82