17 #ifndef OPENKALMAN_SMALLEST_VECTOR_SPACE_DESCRIPTOR_HPP 18 #define OPENKALMAN_SMALLEST_VECTOR_SPACE_DESCRIPTOR_HPP 31 template<
values::number Scalar, coordinates::pattern V, coordinates::pattern...Vs>
32 constexpr coordinates::pattern decltype(
auto)
34 template<
typename Scalar,
typename V,
typename...Vs, std::enable_if_t<
35 values::number<Scalar> and (coordinates::pattern<V> and ... and coordinates::pattern<Vs>),
int> = 0>
36 constexpr decltype(
auto)
38 smallest_vector_space_descriptor(V&& v, Vs&&...vs)
40 if constexpr (
sizeof...(Vs) == 0)
42 return std::forward<V>(v);
46 decltype(
auto) tail = smallest_vector_space_descriptor<Scalar>(
std::forward<Vs>(vs)...);
48 if constexpr ((fixed_pattern<V> and fixed_pattern<decltype(tail)>))
50 if constexpr (dimension_of_v<V> <= dimension_of_v<decltype(tail)>)
51 return
std::forward<V>(v);
53 return
std::forward<decltype(tail)>(tail);
55 else if constexpr (euclidean_pattern<V> and euclidean_pattern<decltype(tail)>)
62 return coordinates::DynamicDescriptor<Scalar> {std::forward<V>(v)};
64 return coordinates::DynamicDescriptor<Scalar> {std::forward<decltype(tail)>(tail)};
71 #endif //OPENKALMAN_SMALLEST_VECTOR_SPACE_DESCRIPTOR_HPP Definition: get_component_start_indices.hpp:29
constexpr bool number
T is a numerical type.
Definition: number.hpp:33
Definition: tuple_reverse.hpp:103
constexpr auto get_dimension(const Arg &arg)
Get the vector dimension of coordinates::pattern Arg.
Definition: get_dimension.hpp:55