![]() |
C++ Library Extensions 2022.12.09
To help learn modern C++ programming
|
Implements Euclidean Algorithm for GCD, LCM. More...
Namespaces | |
namespace | hidden |
Functions | |
template<typename Type > | |
enable_if_in_list_t< Type, integral_list_t > | gcd (Type a, Type b) |
template<template< typename, typename... > class ContainerType, typename EleType > | |
enable_if_in_list_t< EleType, integral_list_t > | gcd (const ContainerType< EleType > &container) |
template<typename Type , typename... Types> | |
auto | gcd (Type arg, Types... args) |
template<typename Type > | |
enable_if_in_list_t< Type, integral_list_t > | lcm (Type a, Type b) |
template<typename Type , typename... Types> | |
auto | lcm (Type arg, Types... args) |
template<template< typename, typename... > class ContainerType, typename EleType > | |
enable_if_in_list_t< EleType, integral_list_t > | lcm (const ContainerType< EleType > &container) |
template<typename Type > | |
enable_if_in_list_t< Type, integral_list_t, void > | reduce (Type &a, Type &b) |
template<typename Type > | |
Type | extended_euclidean_algorithm (Type a, Type b, Type &x, Type &y) |
Implements Euclidean Algorithm for GCD, LCM.
Type tpf::euclidean::extended_euclidean_algorithm | ( | Type | a, |
Type | b, | ||
Type & | x, | ||
Type & | y | ||
) |
enable_if_in_list_t< EleType, integral_list_t > tpf::euclidean::gcd | ( | const ContainerType< EleType > & | container | ) |
enable_if_in_list_t< Type, integral_list_t > tpf::euclidean::gcd | ( | Type | a, |
Type | b | ||
) |
auto tpf::euclidean::gcd | ( | Type | arg, |
Types... | args | ||
) |
enable_if_in_list_t< EleType, integral_list_t > tpf::euclidean::lcm | ( | const ContainerType< EleType > & | container | ) |
enable_if_in_list_t< Type, integral_list_t > tpf::euclidean::lcm | ( | Type | a, |
Type | b | ||
) |
Definition at line 95 of file tpf_euclidean.hpp.
auto tpf::euclidean::lcm | ( | Type | arg, |
Types... | args | ||
) |
enable_if_in_list_t< Type, integral_list_t, void > tpf::euclidean::reduce | ( | Type & | a, |
Type & | b | ||
) |
Definition at line 134 of file tpf_euclidean.hpp.