cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
is_zero.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_IS_ZERO_H
4#define pRC_CORE_FUNCTORS_IS_ZERO_H
5
8
9namespace pRC
10{
11 struct IsZero
12 {
13 template<class X>
14 requires requires { isZero(declval<X>()); }
15 constexpr decltype(auto) operator()(X &&a) const
16 {
17 return isZero(forward<X>(a));
18 }
19
20 template<class X, class XT>
21 requires requires { isZero(declval<X>(), declval<XT>()); }
22 constexpr decltype(auto) operator()(X &&a, XT &&tolerance) const
23 {
24 return isZero(forward<X>(a), forward<XT>(tolerance));
25 }
26 };
27}
28#endif // pRC_CORE_FUNCTORS_IS_ZERO_H
Definition cholesky.hpp:10
static constexpr auto isZero(T const a)
Definition is_zero.hpp:11
Definition is_zero.hpp:12