linbox
Static Protected Member Functions
Local2_32 Struct Reference

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

#include <local2_32.h>

Inherits UnparametricField< K >.

Public Types

Common Object Interface for a LinBox Field.

These methods and member types are required of all LinBox fields.

See FieldArchetype for detailed specifications.

typedef UnparametricRandIter< K > RandIter
 Type of random field element generators.
 

Public Member Functions

Field Object Basics.
std::istream & read (std::istream &is)
 Builds this field to have characteristic q and cardinality qe.
 
std::istream & read (std::istream &s, Element &a) const
 Builds this field to have characteristic q and cardinality qe.
 
template<typename Src >
Element & init (Element &x, const Src &s) const
 Builds this field to have characteristic q and cardinality qe.
 
Element & init (Element &x) const
 Builds this field to have characteristic q and cardinality qe.
 
template<typename T >
T & convert (T &x, const Element &y) const
 Builds this field to have characteristic q and cardinality qe.
 
integercardinality (integer &c) const
 Builds this field to have characteristic q and cardinality qe.
 
integercharacteristic (integer &c) const
 Builds this field to have characteristic q and cardinality qe.
 
Implementation-Specific Methods.

These methods are not required of all LinBox fields and are included only for the implementation of this field template.

const K & operator() (void) const
 Constant access operator.
 
K & operator() (void)
 Access operator.
 

Static Protected Member Functions

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

Detailed Description

Fast arithmetic mod 2^32, including gcd.

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

static Element& HGCD ( Element &  g,
Element &  s,
const Element &  a,
const Element &  b 
)
inlinestaticprotected

Half GCD g = gcd (a, b).

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

std::istream& read ( std::istream &  is)
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

std::istream& read ( std::istream &  s,
Element &  a 
) const
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

Element& init ( Element &  x,
const Src &  s 
) const
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

Element& init ( Element &  x) const
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

T& convert ( T &  x,
const Element &  y 
) const
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

integer& cardinality ( integer c) const
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

integer& characteristic ( integer c) const
inlineinherited

Builds this field to have characteristic q and cardinality qe.

This constructor must be defined in a specialization.

const K& operator() ( void  ) const
inlineinherited

Constant access operator.

Returns
constant reference to field object
K& operator() ( void  )
inlineinherited

Access operator.

Returns
reference to field object

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