16 #ifndef OPENKALMAN_TO_DIAGONAL_HPP 17 #define OPENKALMAN_TO_DIAGONAL_HPP 27 template<indexible Arg>
30 template<
typename Arg, std::enable_if_t<indexible<Arg>,
int> = 0>
31 constexpr decltype(
auto)
35 if constexpr (one_dimensional<Arg>)
37 return std::forward<Arg>(arg);
39 else if constexpr (interface::to_diagonal_defined_for<Arg, Arg&&>)
constexpr bool diagonal_matrix
Specifies that a type is a diagonal matrix or tensor.
Definition: diagonal_matrix.hpp:32
decltype(auto) constexpr to_diagonal(Arg &&arg)
Convert an indexible object into a diagonal matrix.
Definition: to_diagonal.hpp:33
The root namespace for OpenKalman.
Definition: basics.hpp:34
An adapter for creating a diagonal matrix or tensor.
Definition: diagonal_adapter.hpp:27
An interface to various routines from the linear algebra library associated with indexible object T...
Definition: library_interface.hpp:42