cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
is_off_diagonal.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_IS_OFF_DIAGONAL_H
4#define pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_IS_OFF_DIAGONAL_H
5
9
10namespace pRC
11{
12 template<class X, IsTensorish R = RemoveReference<X>, IsValue TT = Value<R>>
13 requires IsInvocable<OffDiagonal, X>
14 static inline constexpr auto isOffDiagonal(X &&a,
15 TT const &tolerance = NumericLimits<TT>::tolerance())
16 {
17 return isApprox(offDiagonal(a), a, tolerance);
18 }
19}
20#endif // pRC_CORE_TENSOR_OPERATOR_FUNCTIONS_IS_OFF_DIAGONAL_H
Definition cholesky.hpp:10
static constexpr auto offDiagonal(X &&a)
Definition off_diagonal.hpp:15
static constexpr auto isApprox(XE &&expected, XA &&approx, TT const &tolerance=NumericLimits< TT >::tolerance())
Definition is_approx.hpp:14
static constexpr auto isOffDiagonal(X &&a, TT const &tolerance=NumericLimits< TT >::tolerance())
Definition is_off_diagonal.hpp:14
Definition limits.hpp:13