16 #ifndef OPENKALMAN_EIGEN_NULLARYFUNCTORTRAITS_HPP 17 #define OPENKALMAN_EIGEN_NULLARYFUNCTORTRAITS_HPP 24 template<
typename NullaryOp,
typename PlainObjectType>
25 struct NullaryFunctorTraits
27 template<
typename Arg>
28 static constexpr
auto get_constant(
const Arg& arg) {
return arg.functor()(); }
30 template<
typename Arg>
31 static constexpr
auto get_constant_diagonal(
const Arg&) {
return std::monostate {}; }
33 template<triangle_type t>
34 static constexpr
bool triangle_type_value =
false;
36 static constexpr
bool is_hermitian =
false;
40 template<
typename Scalar,
typename PlainObjectType>
43 template<
typename Arg>
44 static constexpr
auto get_constant(
const Arg&) {
return std::monostate {}; }
46 template<
typename Arg>
51 static constexpr
bool is_hermitian =
true;
55 template<
typename Scalar,
typename PlainObjectType>
58 template<
typename Arg>
59 static constexpr
auto get_constant(
const Arg&) {
return std::monostate {}; }
61 template<
typename Arg>
62 static constexpr
auto get_constant_diagonal(
const Arg&) {
return std::monostate {}; }
64 template<triangle_type t>
65 static constexpr
bool triangle_type_value =
false;
67 static constexpr
bool is_hermitian =
false;
71 template<
typename Scalar,
typename PlainObjectType>
74 template<
typename Arg>
75 static constexpr
auto get_constant(
const Arg& arg) {
return arg.functor()(); }
77 template<
typename Arg>
78 static constexpr
auto get_constant_diagonal(
const Arg&) {
return std::monostate {}; }
80 template<triangle_type t>
81 static constexpr
bool triangle_type_value =
false;
83 static constexpr
bool is_hermitian = not values::complex<Scalar>;
triangle_type
The type of a triangular matrix.
Definition: enumerations.hpp:26
Definition: fixed_value.hpp:41
Definition: eigen-forward-declarations.hpp:32
Definition: eigen-comma-initializers.hpp:20
A diagonal matrix (both a lower-left and an upper-right triangular matrix).
Definition: eigen-forward-declarations.hpp:22
Definition for triangle_type_of.