cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
is_odd.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_BASIC_FUNCTIONS_IS_ODD_H
4#define pRC_CORE_BASIC_FUNCTIONS_IS_ODD_H
5
7
8namespace pRC
9{
10 template<IsIntegral T>
11 static inline constexpr auto isOdd(T const a)
12 {
13 return a % T(2) != 0;
14 }
15
16 template<IsIntegral T, T V>
17 static inline constexpr auto isOdd(Constant<T, V> const)
18 {
19 return V % T(2) != 0;
20 }
21}
22#endif // pRC_CORE_BASIC_FUNCTIONS_IS_ODD_H
Definition value.hpp:12
pRC::Float<> T
Definition externs_nonTT.hpp:1
Definition cholesky.hpp:10
static constexpr auto isOdd(T const a)
Definition is_odd.hpp:11
std::integral_constant< T, V > Constant
Definition basics.hpp:38