cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
max.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_MAX_H
4#define pRC_CORE_FUNCTORS_MAX_H
5
9
10namespace pRC
11{
12 struct Max
13 {
14 template<class T>
15 static constexpr auto Identity()
16 {
17 return unit<T>(NumericLimits<Value<T>>::lowest());
18 }
19
20 template<class... Xs>
21 requires requires { max(declval<Xs>()...); }
22 constexpr decltype(auto) operator()(Xs &&...args) const
23 {
24 return max(forward<Xs>(args)...);
25 }
26 };
27}
28#endif // pRC_CORE_FUNCTORS_MAX_H
Definition cholesky.hpp:10
static constexpr auto unit()
Definition unit.hpp:13
typename ValueType< T >::Type Value
Definition value.hpp:72
static constexpr decltype(auto) max(X &&a)
Definition max.hpp:13
Definition max.hpp:13
static constexpr auto Identity()
Definition max.hpp:15
Definition limits.hpp:13