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