16 #ifndef OPENKALMAN_WRITABLE_BY_COMPONENT_HPP 17 #define OPENKALMAN_WRITABLE_BY_COMPONENT_HPP 27 template<
typename T,
typename Indices =
28 std::conditional_t<index_count_v<T> ==
dynamic_size, std::vector<std::size_t>, std::array<std::size_t, index_count_v<T>>>>
29 #ifdef __cpp_lib_concepts 31 indexible<T> and index_range_for<Indices, T> and
32 (not std::is_const_v<std::remove_reference_t<T>>) and (not
empty_object<T>) and
33 interface::set_component_defined_for<
36 constexpr
bool writable_by_component =
37 indexible<T> and index_range_for<Indices, T> and
38 (not std::is_const_v<std::remove_reference_t<T>>) and (not
empty_object<T>) and
39 interface::set_component_defined_for<
40 T,
std::add_lvalue_reference_t<T>, const typename
scalar_type_of<T>::type&, const Indices&>;
46 #endif //OPENKALMAN_WRITABLE_BY_COMPONENT_HPP typename scalar_type_of< T >::type scalar_type_of_t
helper template for scalar_type_of.
Definition: scalar_type_of.hpp:54
Definition: tuple_reverse.hpp:103
Type scalar type (e.g., std::float, std::double, std::complex<double>) of a tensor.
Definition: scalar_type_of.hpp:32
The root namespace for OpenKalman.
Definition: basics.hpp:34
constexpr std::size_t dynamic_size
A constant indicating that a size or index is dynamic.
Definition: global-definitions.hpp:33
constexpr bool empty_object
Specifies that an object is empty (i.e., at least one index is zero-dimensional). ...
Definition: empty_object.hpp:39
constexpr bool writable_by_component
Specifies that a type has components that can be set with Indices (an std::ranges::input_range) of ty...
Definition: writable_by_component.hpp:36