C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tpf::euclidean Namespace Reference

Implements Euclidean Algorithm for GCD, LCM. More...

Namespaces

namespace  hidden
 

Functions

template<typename Type >
enable_if_in_list_t< Type, integral_list_tgcd (Type a, Type b)
 
template<template< typename, typename... > class ContainerType, typename EleType >
enable_if_in_list_t< EleType, integral_list_tgcd (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_tlcm (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_tlcm (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)
 

Detailed Description

Implements Euclidean Algorithm for GCD, LCM.

Function Documentation

◆ extended_euclidean_algorithm()

template<typename Type >
Type tpf::euclidean::extended_euclidean_algorithm ( Type  a,
Type  b,
Type &  x,
Type &  y 
)

Definition at line 199 of file tpf_euclidean.hpp.

Here is the call graph for this function:

◆ gcd() [1/3]

template<template< typename, typename... > class ContainerType, typename EleType >
enable_if_in_list_t< EleType, integral_list_t > tpf::euclidean::gcd ( const ContainerType< EleType > &  container)

Definition at line 63 of file tpf_euclidean.hpp.

Here is the call graph for this function:

◆ gcd() [2/3]

template<typename Type >
enable_if_in_list_t< Type, integral_list_t > tpf::euclidean::gcd ( Type  a,
Type  b 
)

Definition at line 50 of file tpf_euclidean.hpp.

Here is the caller graph for this function:

◆ gcd() [3/3]

template<typename Type , typename... Types>
auto tpf::euclidean::gcd ( Type  arg,
Types...  args 
)

Definition at line 87 of file tpf_euclidean.hpp.

Here is the call graph for this function:

◆ lcm() [1/3]

template<template< typename, typename... > class ContainerType, typename EleType >
enable_if_in_list_t< EleType, integral_list_t > tpf::euclidean::lcm ( const ContainerType< EleType > &  container)

Definition at line 108 of file tpf_euclidean.hpp.

Here is the call graph for this function:

◆ lcm() [2/3]

template<typename Type >
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lcm() [3/3]

template<typename Type , typename... Types>
auto tpf::euclidean::lcm ( Type  arg,
Types...  args 
)

Definition at line 101 of file tpf_euclidean.hpp.

Here is the call graph for this function:

◆ reduce()

template<typename Type >
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.

Here is the call graph for this function:
Here is the caller graph for this function: