16 #ifndef OPENKALMAN_EIGEN_TRAITS_CWISETERNARYOP_HPP 17 #define OPENKALMAN_EIGEN_TRAITS_CWISETERNARYOP_HPP 19 #include <type_traits> 24 template<
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
30 using Xpr = Eigen::CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3>;
35 template<
typename Arg,
typename N>
39 if constexpr (square_shaped<Arg1> or square_shaped<Arg2> or square_shaped<Arg3>)
40 return internal::best_vector_space_descriptor(
41 OpenKalman::get_vector_space_descriptor<0>(arg.arg1()),
42 OpenKalman::get_vector_space_descriptor<0>(arg.arg2()),
43 OpenKalman::get_vector_space_descriptor<0>(arg.arg3()),
44 OpenKalman::get_vector_space_descriptor<1>(arg.arg1()),
45 OpenKalman::get_vector_space_descriptor<1>(arg.arg2()),
46 OpenKalman::get_vector_space_descriptor<1>(arg.arg3()));
48 return internal::best_vector_space_descriptor(
58 template<
typename Arg>
59 static constexpr
auto get_constant(
const Arg& arg)
62 return Traits::template get_constant<false>(arg);
65 template<
typename Arg>
66 static constexpr
auto get_constant_diagonal(
const Arg& arg)
69 return Traits::template get_constant<true>(arg);
72 template<Applicability b>
74 OpenKalman::one_dimensional<Arg1, Applicability::permitted> and
75 OpenKalman::one_dimensional<Arg2, Applicability::permitted> and
76 OpenKalman::one_dimensional<Arg3, Applicability::permitted> and
78 not has_dynamic_dimensions<Xpr> or
79 OpenKalman::one_dimensional<Arg1, b> or
80 OpenKalman::one_dimensional<Arg2, b> or
81 OpenKalman::one_dimensional<Arg3, b>);
84 template<Applicability b>
85 static constexpr
bool is_square =
86 square_shaped<Arg1, Applicability::permitted> and
87 square_shaped<Arg2, Applicability::permitted> and
88 square_shaped<Arg3, Applicability::permitted> and
90 not has_dynamic_dimensions<Xpr> or
91 square_shaped<Arg1, b> or
92 square_shaped<Arg2, b> or
93 square_shaped<Arg3, b>);
96 template<TriangleType t>
99 static constexpr
bool is_triangular_adapter =
false;
106 #endif //OPENKALMAN_EIGEN_TRAITS_CWISETERNARYOP_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 concept, trait, or restraint represents a compile-time guarantee.
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
Definition: eigen-forward-declarations.hpp:70