16 #ifndef OPENKALMAN_FILL_COMPONENTS_HPP 17 #define OPENKALMAN_FILL_COMPONENTS_HPP 26 template<std::
size_t rank = 0,
typename U,
typename Indices,
typename S>
28 fill_components_impl(U& u,
const Indices& indices,
const S& s)
30 if constexpr (rank < std::rank_v<T>)
33 set_component_impl<rank + 1>(u[i], indices, s);
54 template<internal::layout_mapping_policy layout = stdex::layout_right,
indexible Arg,
values::number ... S> requires
55 (std::same_as<layout, stdex::layout_right> or std::same_as<layout, stdex::layout_left>) and
56 internal::may_hold_components<Arg, S...> and
57 (
sizeof...(S) == 0 or interface::fill_components_defined_for<Arg, layout, std::add_lvalue_reference_t<Arg>, S...>)
60 template<
typename layout layout = stdex::layout_right,
typename Arg,
typename...S, std::enable_if_t<
61 indexible<Arg> and (values::number<S> and ...) and
62 (std::same_as<layout, stdex::layout_right> or std::same_as<layout, stdex::layout_left>) and
63 internal::may_hold_components<Arg, S...> and
64 (
sizeof...(S) == 0 or interface::fill_components_defined_for<Arg, layout, std::add_lvalue_reference_t<Arg>, S...>),
int> = 0>
69 if constexpr (
sizeof...(S) == 0)
71 return std::forward<Arg>(arg);
77 Trait::template fill_components<layout>(arg,
static_cast<const Scalar
>(s)...);
78 return std::forward<Arg>(arg);
Definition for layout_mapping_policy.
constexpr bool indexible
T is a multidimensional array type.
Definition: indexible.hpp:32
decltype(auto) constexpr to_value_type(Arg &&arg)
Convert, if necessary, a fixed or dynamic value to its underlying base type.
Definition: to_value_type.hpp:28
constexpr bool number
T is a numerical field type.
Definition: number.hpp:41
The root namespace for OpenKalman.
Definition: basics.hpp:34
An interface to various routines from the linear algebra library associated with indexible object T...
Definition: library_interface.hpp:42
Arg && fill_components(Arg &&arg, S...s)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: fill_components.hpp:67
decltype(auto) constexpr get_element(Arg &&arg, I i)
A generalization of std::get and the range subscript operator.
Definition: get_element.hpp:122
typename element_type_of< T >::type element_type_of_t
helper template for element_type_of.
Definition: element_type_of.hpp:54