16 #ifndef OPENKALMAN_MAKE_VECTOR_SPACE_ADAPTER_HPP 17 #define OPENKALMAN_MAKE_VECTOR_SPACE_ADAPTER_HPP 28 template<indexible Arg, pattern_collection Descriptors> requires
29 internal::not_more_fixed_than<Arg, Descriptors> and (not internal::less_fixed_than<Arg, Descriptors>) and
30 internal::maybe_same_shape_as_vector_space_descriptors<Arg, Descriptors>
32 template<
typename Arg,
typename Descriptors, std::enable_if_t<
33 indexible<Arg> and pattern_collection<Descriptors> and
34 internal::not_more_fixed_than<Arg, Descriptors> and (not internal::less_fixed_than<Arg, Descriptors>) and
35 internal::maybe_same_shape_as_vector_space_descriptors<Arg, Descriptors>,
int> = 0>
39 if constexpr (fixed_pattern_tuple<Descriptors> and
40 compatible_with_vector_space_descriptor_collection<Arg, Descriptors>)
41 return std::forward<Arg>(arg);
43 return VectorSpaceAdapter {std::forward<Arg>(arg), internal::remove_trailing_1D_descriptors(std::forward<Descriptors>(descriptors))};
52 template<
indexible Arg, coordinates::pattern...Ds> requires
53 internal::not_more_fixed_than<Arg, std::tuple<Ds...>> and
54 (not internal::less_fixed_than<Arg, std::tuple<Ds...>>) and
55 internal::maybe_same_shape_as_vector_space_descriptors<Arg, std::tuple<Ds...>>
57 template<
typename Arg,
typename...Ds, std::enable_if_t<
58 indexible<Arg> and (... and coordinates::pattern<Ds>) and
59 internal::not_more_fixed_than<Arg, std::tuple<Ds...>> and
60 (not internal::less_fixed_than<Arg, std::tuple<Ds...>>) and
61 internal::maybe_same_shape_as_vector_space_descriptors<Arg, std::tuple<Ds...>>,
int> = 0>
74 template<fixed_pattern...Ds,
indexible Arg> requires (not has_dynamic_dimensions<Arg>) and
75 (
sizeof...(Ds) > 0) and internal::maybe_same_shape_as_vector_space_descriptors<Arg, std::tuple<Ds...>>
77 template<
typename...Ds,
typename Arg, std::enable_if_t<
78 indexible<Arg> and (... and fixed_pattern<Ds>) and
79 (not has_dynamic_dimensions<Arg>) and (
sizeof...(Ds) > 0) and
80 internal::maybe_same_shape_as_vector_space_descriptors<Arg, std::tuple<Ds...>>,
int> = 0>
90 #endif //OPENKALMAN_MAKE_VECTOR_SPACE_ADAPTER_HPP An adapter that adds vector space descriptors for each index.
Definition: forward-class-declarations.hpp:301
auto make_vector_space_adapter(Arg &&arg, Descriptors &&descriptors)
If necessary, wrap an object in a wrapper that adds vector space descriptors for each index...
Definition: make_vector_space_adapter.hpp:37
constexpr bool indexible
T is a generalized tensor type.
Definition: indexible.hpp:32
The root namespace for OpenKalman.
Definition: basics.hpp:34