Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

Local2_32 Struct Reference
[linbox/field]

#include <local2_32.h>

Inheritance diagram for Local2_32:

UnparametricField< uint32 > FieldInterface

Detailed Description

Fast arithmetic mod 2^32, including gcd.

Extend UnparametricField<uint32> 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.


Public Types

typedef UnparametricField<
uint32 >::Element 
Element
enum  Exponent { _min = 0, _max = 32 }

Public Member Functions

 Local2_32 (int p=2, int exp=32)

Static Public Member Functions

Exponentgcdin (Exponent &k, const Element &b)
bool isUnit (const Exponent &a)
bool isZero (const Element &a)
bool isZero (const Exponent &a)
bool isUnit (const Element &a)
Elementmulin (Element &a, const Exponent &k)
Elementmulin (Element &a, const Element &b)
Elementaxpyin (Element &r, const Element &x, const Element &y)
Elementdivin (Element &a, const Exponent &k)
Elementinv (Element &a, const Element &b)
integer getMaxModulus ()

Static Protected Member Functions

Elementxgcd (Element &d, Element &s, Element &t, const Element &a, const Element &b)
ElementHGCD (Element &g, Element &s, const Element &a, const Element &b)
 Half GCD g = gcd (a, b). exists t, such that: s * a + t * b = g. return g.


Member Typedef Documentation

typedef UnparametricField<uint32>::Element Element
 

The field's element type. Type K must provide a default constructor, a copy constructor, a destructor, and an assignment operator.

Reimplemented from UnparametricField< uint32 >.


Member Enumeration Documentation

enum Exponent
 

Enumeration values:
_min 
_max 


Constructor & Destructor Documentation

Local2_32 int  p = 2,
int  exp = 32
[inline]
 


Member Function Documentation

Exponent& gcdin Exponent k,
const Element b
[inline, static]
 

bool isUnit const Exponent a  )  [inline, static]
 

bool isZero const Element a  )  [inline, static]
 

bool isZero const Exponent a  )  [inline, static]
 

bool isUnit const Element a  )  [inline, static]
 

Element& mulin Element a,
const Exponent k
[inline, static]
 

Element& mulin Element a,
const Element b
[inline, static]
 

Element& axpyin Element r,
const Element x,
const Element y
[inline, static]
 

Element& divin Element a,
const Exponent k
[inline, static]
 

Element& inv Element a,
const Element b
[inline, static]
 

integer getMaxModulus  )  [inline, static]
 

Element& xgcd Element d,
Element s,
Element t,
const Element a,
const Element b
[inline, static, protected]
 

Element& HGCD Element g,
Element s,
const Element a,
const Element b
[inline, static, protected]
 

Half GCD g = gcd (a, b). exists t, such that: s * a + t * b = g. return g.


Generated on Fri Jul 8 10:29:52 2005 for linbox by doxygen 1.3.7