Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
math::gcd::ExtendedGCDLoop Class Reference

#include <extended_gcd_loop.h>

List of all members.

Static Public Member Functions

template<typename T >
static std::pair< T, T > extended_gcd_positive (T a, T b)

Detailed Description

Class computing extended GCD using loop


Member Function Documentation

template<typename T >
static std::pair<T, T> math::gcd::ExtendedGCDLoop::extended_gcd_positive ( a,
b 
) [inline, static]

Returns extended gcd, i.e. pair(x, y) such that x * a + y * b == gcd(a, b)

Note: that returned values can be negative

Note: for both zero arguments function will return (0,0)

Warning:
T can be only to signed integer
Parameters:
anon-negative integer
bnon-negative integer
Returns:
(x,y) such that a*x+b*y==gcd(a,b)


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines