cMHN
1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
pRC
prc
core
functors
add.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef pRC_CORE_FUNCTORS_ADD_H
4
#define pRC_CORE_FUNCTORS_ADD_H
5
6
#include <
prc/core/basic/basics.hpp
>
7
#include <
prc/core/basic/functions/zero.hpp
>
8
9
namespace
pRC
10
{
11
struct
Add
12
{
13
template
<
class
T>
14
requires
requires
{
zero<T>
(); }
15
static
constexpr
auto
Identity
()
16
{
17
return
zero<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_ADD_H
basics.hpp
zero.hpp
pRC
Definition
cholesky.hpp:10
pRC::zero
static constexpr auto zero()
Definition
zero.hpp:12
pRC::Add
Definition
add.hpp:12
pRC::Add::Identity
static constexpr auto Identity()
Definition
add.hpp:15
Generated by
1.11.0