16 #ifndef OPENKALMAN_EIGEN_NULLARYFUNCTORTRAITS_HPP 17 #define OPENKALMAN_EIGEN_NULLARYFUNCTORTRAITS_HPP 19 #include <type_traits> 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<TriangleType t>
34 static constexpr
bool is_triangular =
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>
49 template<TriangleType t>
50 static constexpr
bool is_triangular =
true;
52 static constexpr
bool is_hermitian =
true;
56 template<
typename Scalar,
typename PlainObjectType>
59 template<
typename Arg>
60 static constexpr
auto get_constant(
const Arg&) {
return std::monostate {}; }
62 template<
typename Arg>
63 static constexpr
auto get_constant_diagonal(
const Arg&) {
return std::monostate {}; }
65 template<TriangleType t>
66 static constexpr
bool is_triangular =
false;
68 static constexpr
bool is_hermitian =
false;
72 template<
typename Scalar,
typename PlainObjectType>
75 template<
typename Arg>
76 static constexpr
auto get_constant(
const Arg& arg) {
return arg.functor()(); }
78 template<
typename Arg>
79 static constexpr
auto get_constant_diagonal(
const Arg&) {
return std::monostate {}; }
81 template<TriangleType t>
82 static constexpr
bool is_triangular =
false;
84 static constexpr
bool is_hermitian = not values::complex<Scalar>;
89 #endif //OPENKALMAN_EIGEN_NULLARYFUNCTORTRAITS_HPP Definition: eigen-forward-declarations.hpp:32
Definition: eigen-comma-initializers.hpp:20
Definition: eigen-forward-declarations.hpp:22