linbox
Protected Member Functions
Local2_32 Struct Reference

Fast arithmetic mod 2^32, including gcd. More...

#include <local2_32.h>

Inherits ZRing< uint32_t >.

Protected Member Functions

Element & HGCD (Element &g, Element &s, const Element &a, const Element &b) const
 Half GCD g = gcd (a, b). More...
 

Detailed Description

Fast arithmetic mod 2^32, including gcd.

Extend Givaro::ZRing<uint32_t> which is a representation of Z_2^32. It is especially fast because it uses hardware arithmetic directly. This ring is a Local Principal Ideal Ring.

These needed PIR functions are added: gcdin(), isUnit(), also inv() is modified to work correctly. The type Exponent is added: more effective rep of the powers of 2, which are important because gcds are powers of 2). This entails some new versions of divin(), mulin(), isUnit().

Those are the function needed for the LocalSmith algorithm. Further appropriate PIR functions may be added later.

Examples:
examples/smith.C.

Member Function Documentation

Element& HGCD ( Element &  g,
Element &  s,
const Element &  a,
const Element &  b 
) const
inlineprotected

Half GCD g = gcd (a, b).

exists t, such that: s * a + t * b = g. return g.


The documentation for this struct was generated from the following file: