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