cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
is_lower_triangular.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_IS_LOWER_TRIANGULAR_H
4#define pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_IS_LOWER_TRIANGULAR_H
5
11
12namespace pRC
13{
14 template<class X, class R = RemoveReference<X>, If<IsTensorish<R>> = 0,
15 If<IsInvocable<LowerTriangular, X>> = 0,
16 If<IsInvocable<IsApprox, ResultOf<LowerTriangular, X>, X>> = 0,
17 class TT = typename R::Value>
18 static inline constexpr auto isLowerTriangular(X &&a,
19 TT const &tolerance = NumericLimits<TT>::tolerance())
20 {
21 return isApprox(lowerTriangular(a), a, tolerance);
22 }
23}
24#endif // pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_IS_LOWER_TRIANGULAR_H
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
static constexpr auto isApprox(XA &&a, XB &&b, TT const &tolerance=NumericLimits< TT >::tolerance())
Definition is_approx.hpp:24
static constexpr auto lowerTriangular(X &&a)
Definition lower_triangular.hpp:15
static constexpr auto isLowerTriangular(X &&a, TT const &tolerance=NumericLimits< TT >::tolerance())
Definition is_lower_triangular.hpp:18
Definition limits.hpp:13