cMHN
1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
pRC
prc
core
functors
fold.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef pRC_CORE_FUNCTORS_FOLD_H
4
#define pRC_CORE_FUNCTORS_FOLD_H
5
6
#include <
prc/core/basic/basics.hpp
>
7
#include <
prc/core/basic/direction.hpp
>
8
9
namespace
pRC
10
{
11
template
<
class
F, Bool E = false, Direction D = Direction::Forwards>
12
struct
Fold
13
{
14
template
<
class
... Xs>
15
requires
requires
{
fold<F, E, D>
(declval<Xs>()...); }
16
constexpr
decltype
(
auto
)
operator
()(Xs &&...args)
const
17
{
18
return
fold<F, E, D>
(forward<Xs>(args)...);
19
}
20
};
21
}
22
#endif
// pRC_CORE_FUNCTORS_FOLD_H
basics.hpp
direction.hpp
pRC
Definition
cholesky.hpp:10
pRC::fold
static constexpr decltype(auto) fold(X &&a)
Definition
fold.hpp:14
pRC::Fold
Definition
fold.hpp:13
Generated by
1.11.0