fun namespace
Classes
Functions
-
template<typename T>auto abs(const T& a) -> typename std::enable_if< std::is_unsigned< T >::value, T >::type -> CONSTEXPR14 auto
- absolute (unsigned)
-
template<typename _Mn>auto gcd_recur(const _Mn& __m, const _Mn& __n) -> _Mn -> CONSTEXPR14 auto
- Greatest common divider.
-
template<typename _Mn>auto gcd(const _Mn& __m, const _Mn& __n) -> _Mn -> CONSTEXPR14 auto
- Greatest common divider.
-
template<typename _Mn>auto lcm(const _Mn& __m, const _Mn& __n) -> _Mn -> CONSTEXPR14 auto
- Least common multiple.
Function documentation
#include <py2cpp/fractions.hpp>
template<typename T>
CONSTEXPR14 auto fun:: abs(const T& a) -> typename std::enable_if< std::is_unsigned< T >::value, T >::type
absolute (unsigned)
Template parameters | |
---|---|
T | |
Parameters | |
a in |
absolute (signed)
#include <py2cpp/fractions.hpp>
template<typename _Mn>
CONSTEXPR14 auto fun:: gcd_recur(const _Mn& __m,
const _Mn& __n) -> _Mn
Greatest common divider.
Template parameters | |
---|---|
_Mn | |
Parameters | |
__m in | |
__n in | |
Returns | _Mn |
#include <py2cpp/fractions.hpp>
template<typename _Mn>
CONSTEXPR14 auto fun:: gcd(const _Mn& __m,
const _Mn& __n) -> _Mn
Greatest common divider.
Template parameters | |
---|---|
_Mn | |
Parameters | |
__m in | |
__n in | |
Returns | _Mn |
#include <py2cpp/fractions.hpp>
template<typename _Mn>
CONSTEXPR14 auto fun:: lcm(const _Mn& __m,
const _Mn& __n) -> _Mn
Least common multiple.
Template parameters | |
---|---|
_Mn | |
Parameters | |
__m in | |
__n in | |
Returns | _Mn |