16 #ifndef OPENKALMAN_CONJUGATE_HPP 17 #define OPENKALMAN_CONJUGATE_HPP 29 #include "linear-algebra/functions/internal/make_wrapped_mdspan.hpp" 39 template<indexible Arg>
41 template<
typename Arg, std::enable_if_t<indexible<Arg>,
int> = 0>
43 constexpr decltype(
auto)
48 return std::forward<Arg>(arg);
50 else if constexpr (interface::conjugate_defined_for<Arg&&>)
54 else if constexpr (constant_object<Arg>)
58 else if constexpr (constant_diagonal_object<Arg>)
62 else if constexpr (diagonal_matrix<Arg>)
69 using nested_accessor =
typename std::decay_t<decltype(n)>::accessor_type;
70 using accessor_type = stdex::linalg::conjugated_accessor<nested_accessor>;
71 return internal::make_wrapped_mdspan(
72 std::forward<Arg>(arg),
75 accessor_type(n.accessor()),
Definition: language-features.hpp:228
Definition for constant_object.
Header file for code relating to values (e.g., scalars and indices)
decltype(auto) constexpr conjugate(Arg &&arg)
Take the complex conjugate of an indexible object.
Definition: conjugate.hpp:44
Definition for constant_diagonal_object.
constexpr bool complex
T is a value that reduces to std::complex or a custom complex type.
Definition: complex.hpp:47
decltype(auto) constexpr get_pattern_collection(T &&t)
Get the patterns::pattern_collection associated with indexible object T.
Definition: get_pattern_collection.hpp:36
constexpr bool not_complex
T is a value in which either its type is not complex or its imaginary component is 0...
Definition: not_complex.hpp:48
Definition for diagonal_matrix.
constexpr auto make_constant_diagonal(C c, P &&p)
Make an indexible object in which every diagonal element is a constant value.
Definition: make_constant_diagonal.hpp:40
Definition for element_type_of.
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
decltype(auto) constexpr diagonal_of(Arg &&arg)
Extract a column vector (or column slice for rank>2 tensors) comprising the diagonal elements...
Definition: diagonal_of.hpp:44
constexpr auto conj(const Arg &arg)
A constexpr function for the complex conjugate of a (complex) number.
Definition: conj.hpp:39
Definition of get_mdspan function.
constexpr auto make_constant(C c, P &&p)
Make an indexible object in which every element is a constant value.
Definition: make_constant.hpp:41
constexpr auto constant_value(T &&t)
The constant value associated with a constant_object or constant_diagonal_object. ...
Definition: constant_value.hpp:37
Definition of get_pattern_collection function.
Definition for indexible.
The static constant value of an indexible object, if it exists.
Definition: constant_value_of.hpp:31
Definition for constant_value_of.
decltype(auto) constexpr to_diagonal(Arg &&arg, P &&p)
Convert a column vector (or any other array with a 1D second index) into a diagonal_matrix.
Definition: to_diagonal.hpp:46
typename element_type_of< T >::type element_type_of_t
helper template for element_type_of.
Definition: element_type_of.hpp:54
Definitions for make_constant.
Definition for to_diagonal function.
decltype(auto) constexpr get_mdspan(T &&t)
Get the mdspan associated with indexible object T.
Definition: get_mdspan.hpp:35