cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
unit_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_UNIT_UPPER_TRIANGULAR_H
4#define pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_UNIT_UPPER_TRIANGULAR_H
5
9
10namespace pRC
11{
12 template<class X, class R = RemoveReference<X>, If<IsTensorish<R>> = 0,
13 If<IsInvocable<View, X>> = 0,
14 If<IsSatisfied<(typename R::Dimension() == 2)>> = 0>
15 static inline constexpr auto unitUpperTriangular(X &&a)
16 {
18 return TensorViews::UnitUpperTriangular<typename R::Type,
19 typename R::Sizes, V>(view(forward<X>(a)));
20 }
21
22 template<class X, class R = RemoveReference<X>, If<IsTensorish<R>> = 0,
23 If<Not<IsInvocable<View, X>>> = 0,
24 If<IsInvocable<UnitUpperTriangular, X &>> = 0>
25 static inline constexpr auto unitUpperTriangular(X &&a)
26 {
27 return eval(unitUpperTriangular(a));
28 }
29}
30#endif // pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_UNIT_UPPER_TRIANGULAR_H
Definition unit_upper_triangular.hpp:14
Definition cholesky.hpp:18
static constexpr X eval(X &&a)
Definition eval.hpp:11
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
static constexpr X view(X &&a)
Definition view.hpp:12
static constexpr auto unitUpperTriangular(X &&a)
Definition unit_upper_triangular.hpp:15