|
Py2Cpp 1.6.3; VERSION ${PROJECT_VERSION}
|
Classes | |
| struct | Fraction |
| Fraction. More... | |
Functions | |
| template<typename T > | |
| CONSTEXPR14 auto | abs (const T &a) -> typename std::enable_if< std::is_unsigned< T >::value, T >::type |
| Absolute value for unsigned types. | |
| template<typename Mn > | |
| CONSTEXPR14 auto | gcd_recur (const Mn &_m, const Mn &_n) -> Mn |
| Greatest common divisor (recursive) | |
| template<typename Mn > | |
| CONSTEXPR14 auto | gcd (const Mn &_m, const Mn &_n) -> Mn |
| Greatest common divisor. | |
| template<typename Mn > | |
| CONSTEXPR14 auto | lcm (const Mn &_m, const Mn &_n) -> Mn |
| Least common multiple. | |
| CONSTEXPR14 auto fun::abs | ( | const T & | a | ) | -> typename std::enable_if<std::is_unsigned<T>::value, T>::type |
Absolute value for unsigned types.
For unsigned types, the absolute value is the number itself.
| T | The numeric type |
| [in] | a | The value to compute absolute value of |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Absolute value for signed types. For signed types, returns the negative value if the input is negative.
| CONSTEXPR14 auto fun::gcd | ( | const Mn & | _m, |
| const Mn & | _n | ||
| ) | -> Mn |
Greatest common divisor.
Computes the greatest common divisor of two numbers.
| Mn | The numeric type |
| [in] | _m | First number |
| [in] | _n | Second number |
| CONSTEXPR14 auto fun::gcd_recur | ( | const Mn & | _m, |
| const Mn & | _n | ||
| ) | -> Mn |
Greatest common divisor (recursive)
Computes the greatest common divisor of two numbers using Euclidean algorithm.
| Mn | The numeric type |
| [in] | _m | First number |
| [in] | _n | Second number |
| CONSTEXPR14 auto fun::lcm | ( | const Mn & | _m, |
| const Mn & | _n | ||
| ) | -> Mn |
Least common multiple.
| Mn |
| [in] | _m | |
| [in] | _n |