cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
strictly_upper_triangular.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_STRICTLY_UPPER_TRIANGULAR_H
4#define pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_STRICTLY_UPPER_TRIANGULAR_H
5
9
10namespace pRC
11{
12 template<class X, IsTensorish R = RemoveReference<X>>
13 requires(R::Dimension == 2)
14 static inline constexpr auto strictlyUpperTriangular(X &&a)
15 {
16 if constexpr(IsInvocable<View, X>)
17 {
19 return TensorViews::StrictlyUpperTriangular<typename R::Type,
20 typename R::Sizes, V>(view(forward<X>(a)));
21 }
22 else
23 {
25 }
26 }
27}
28#endif // pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_STRICTLY_UPPER_TRIANGULAR_H
Definition strictly_upper_triangular.hpp:15
Definition concepts.hpp:31
Definition cholesky.hpp:10
std::remove_reference_t< T > RemoveReference
Definition basics.hpp:41
static constexpr decltype(auto) view(X &&a)
Definition view.hpp:13
static constexpr auto strictlyUpperTriangular(X &&a)
Definition strictly_upper_triangular.hpp:14
static constexpr decltype(auto) eval(X &&a)
Definition eval.hpp:12