16 #ifndef OPENKALMAN_EIGEN_SELFADJOINTVIEW_HPP 17 #define OPENKALMAN_EIGEN_SELFADJOINTVIEW_HPP 19 #include <type_traits> 26 template<
typename MatrixType,
unsigned int UpLo>
31 using Xpr = Eigen::SelfAdjointView<MatrixType, UpLo>;
32 using IndexType =
typename MatrixType::Index;
36 using scalar_type = scalar_type_of_t<MatrixType>;
39 template<
typename Arg>
43 template<
typename Arg,
typename N>
50 template<
typename Arg>
53 return std::forward<Arg>(arg).nestedExpression();
57 template<
typename Arg>
58 static constexpr
auto get_constant(
const Arg& arg)
66 else return std::monostate{};
68 else return std::monostate{};
72 template<
typename Arg>
73 static constexpr
auto get_constant_diagonal(
const Arg& arg)
75 return constant_diagonal_value {arg.nestedExpression()};
79 template<applicability b>
80 static constexpr
bool one_dimensional = OpenKalman::one_dimensional<MatrixType, b>;
83 template<applicability b>
84 static constexpr
bool is_square = square_shaped<MatrixType, b>;
87 template<triangle_type t>
88 static constexpr
bool triangle_type_value = diagonal_matrix<MatrixType>;
91 static constexpr
bool is_triangular_adapter =
false;
94 static constexpr
bool is_hermitian =
95 (not values::complex<typename Eigen::internal::traits<MatrixType>::Scalar>) or
111 #ifdef __cpp_concepts 112 template<Eigen3::eigen_SelfAdjo
intView M>
114 template<
typename M, std::enable_if_t<Eigen3::eigen_SelfAdjo
intView<M>,
int> = 0>
A hermitian matrix wrapper.
Definition: HermitianAdapter.hpp:33
constexpr bool one_dimensional
Specifies that a type is one-dimensional in every index.
Definition: one_dimensional.hpp:56
A lower-left triangular matrix.
constexpr bool complex
T is a value that reduces to std::complex or a custom complex type.
Definition: complex.hpp:47
constexpr auto count_indices(const T &)
Get the number of indices necessary to address all the components of an indexible object...
Definition: count_indices.hpp:51
Definition: eigen-comma-initializers.hpp:20
decltype(auto) constexpr get_pattern_collection(T &&t)
Get the coordinates::pattern_collection associated with indexible object T.
Definition: get_pattern_collection.hpp:59
HermitianAdapterType
The type of a hermitian adapter, indicating which triangle of the nested matrix is used...
Definition: enumerations.hpp:79
constexpr bool not_complex
T is a value in which either its type is not complex or its imaginary component is 0...
Definition: not_complex.hpp:48
HermitianAdapter(M &&) -> HermitianAdapter< std::conditional_t< hermitian_adapter< M >, nested_object_of_t< M >, M >, hermitian_adapter< M > ? hermitian_adapter_type_of_v< M > :HermitianAdapterType::lower >
Deduction guide for converting Eigen::SelfAdjointView to HermitianAdapter.
The root namespace for OpenKalman.
Definition: basics.hpp:34
Definition: object_traits.hpp:38
An upper-right triangular matrix.
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 fixed
T is a value that is determinable at compile time.
Definition: fixed.hpp:66
decltype(auto) constexpr nested_object(Arg &&arg)
Retrieve a nested object of Arg, if it exists.
Definition: nested_object.hpp:35