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>
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)
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<TriangleType t>
75 static constexpr
bool is_triangular = 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
Layout layout = layout_of_v<XprType>;
90 #endif //OPENKALMAN_EIGEN_TRAITS_MATRIXWRAPPER_HPP constexpr bool one_dimensional
Specifies that a type is one-dimensional in every index.
Definition: one_dimensional.hpp:83
Definition: indexible_object_traits.hpp:36
Definition: basics.hpp:41
Trait object providing get and set routines.
Definition: eigen-forward-declarations.hpp:502
Definition: eigen-comma-initializers.hpp:20
The constant associated with T, assuming T is a constant_matrix.
Definition: constant_coefficient.hpp:36
The constant associated with T, assuming T is a constant_diagonal_matrix.
Definition: constant_diagonal_coefficient.hpp:32
Layout
The layout format of a multidimensional array.
Definition: global-definitions.hpp:47
decltype(auto) constexpr nested_object(Arg &&arg)
Retrieve a nested object of Arg, if it exists.
Definition: nested_object.hpp:34
constexpr auto get_vector_space_descriptor(const T &t, const N &n)
Get the coordinates::pattern object for index N of indexible object T.
Definition: get_vector_space_descriptor.hpp:56