Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Modular< int8 > Class Template Reference

#include <modular-byte.h>

Inheritance diagram for Modular< int8 >:

FieldInterface List of all members.

Detailed Description

template<>
class LinBox::Modular< int8 >

Specialization of Modular to signed 8 bit element type with efficient dot product. @doc Efficient element operations for dot product, mul, axpy, by using floating point inverse of modulus (borrowed from NTL) and some use of non-normalized intermediate values.

Requires: modulus < 2^7. Intended use: prime modulus < 2^7.


Public Types

typedef int8 Element
typedef ModularRandIter< Element > RandIter

Public Methods

 Modular ()
 Modular (int value, int exp=1)
 Modular (const Modular< int8 > &mf)
Modular & operator= (const Modular< int8 > &F)
integer & cardinality (integer &c) const
integer & characteristic (integer &c) const
integer & convert (integer &x, const Element &y) const
std::ostream & write (std::ostream &os) const
std::istream & read (std::istream &is)
std::ostream & write (std::ostream &os, const Element &x) const
std::istream & read (std::istream &is, Element &x) const
Element & init (Element &x, const integer &y) const
Element & init (Element &x, int y=0) const
Element & init (Element &x, long y) const
Element & assign (Element &x, const Element &y) const
bool areEqual (const Element &x, const Element &y) const
bool isZero (const Element &x) const
bool isOne (const Element &x) const
Element & add (Element &x, const Element &y, const Element &z) const
Element & sub (Element &x, const Element &y, const Element &z) const
Element & mul (Element &x, const Element &y, const Element &z) const
Element & div (Element &x, const Element &y, const Element &z) const
Element & neg (Element &x, const Element &y) const
Element & inv (Element &x, const Element &y) const
Element & axpy (Element &r, const Element &a, const Element &x, const Element &y) const
Element & addin (Element &x, const Element &y) const
Element & subin (Element &x, const Element &y) const
Element & mulin (Element &x, const Element &y) const
Element & divin (Element &x, const Element &y) const
Element & negin (Element &x) const
Element & invin (Element &x) const
Element & axpyin (Element &r, const Element &a, const Element &x) const

Static Public Methods

int8 getMaxModulus ()

Protected Attributes

int8 modulus
double modulusinv

Friends

class FieldAXPY< Modular< int8 > >
class DotProductDomain< Modular< int8 > >
class MVProductDomain< Modular< int8 > >


Member Typedef Documentation

typedef int8 Element
 

typedef ModularRandIter<Element> RandIter
 


Member Function Documentation

Element& add (  Element &    x,
const Element &    y,
const Element &    z
)  const [inline]
 

Element& addin (  Element &    x,
const Element &    y
)  const [inline]
 

bool areEqual (  const Element &    x,
const Element &    y
)  const [inline]
 

Element& assign (  Element &    x,
const Element &    y
)  const [inline]
 

Element& axpy (  Element &    r,
const Element &    a,
const Element &    x,
const Element &    y
)  const [inline]
 

Element& axpyin (  Element &    r,
const Element &    a,
const Element &    x
)  const [inline]
 

integer& cardinality (  integer &    c )  const [inline]
 

integer& characteristic (  integer &    c )  const [inline]
 

integer& convert (  integer &    x,
const Element &    y
)  const [inline]
 

Element& div (  Element &    x,
const Element &    y,
const Element &    z
)  const [inline]
 

Element& divin (  Element &    x,
const Element &    y
)  const [inline]
 

int8 getMaxModulus (    )  [inline, static]
 

Element& init (  Element &    x,
long    y
)  const [inline]
 

Element& init (  Element &    x,
int    y = 0
)  const [inline]
 

Element& init (  Element &    x,
const integer &    y
)  const [inline]
 

Element& inv (  Element &    x,
const Element &    y
)  const [inline]
 

Element& invin (  Element &    x )  const [inline]
 

bool isOne (  const Element &    x )  const [inline]
 

bool isZero (  const Element &    x )  const [inline]
 

Modular (  const Modular< int8 > &    mf )  [inline]
 

Modular (  int    value,
int    exp = 1
)  [inline]
 

Modular (    )  [inline]
 

Element& mul (  Element &    x,
const Element &    y,
const Element &    z
)  const [inline]
 

Element& mulin (  Element &    x,
const Element &    y
)  const [inline]
 

Element& neg (  Element &    x,
const Element &    y
)  const [inline]
 

Element& negin (  Element &    x )  const [inline]
 

Modular& operator= (  const Modular< int8 > &    F )  [inline]
 

std::istream& read (  std::istream &    is,
Element &    x
)  const [inline]
 

std::istream& read (  std::istream &    is )  [inline]
 

Element& sub (  Element &    x,
const Element &    y,
const Element &    z
)  const [inline]
 

Element& subin (  Element &    x,
const Element &    y
)  const [inline]
 

std::ostream& write (  std::ostream &    os,
const Element &    x
)  const [inline]
 

std::ostream& write (  std::ostream &    os )  const [inline]
 


Friends And Related Function Documentation

friend class DotProductDomain< Modular< int8 > > [friend]
 

friend class FieldAXPY< Modular< int8 > > [friend]
 

friend class MVProductDomain< Modular< int8 > > [friend]
 


Member Data Documentation

int8 modulus [protected]
 

double modulusinv [protected]
 


Generated on Mon Jun 20 09:16:55 2005 for linbox by doxygen1.2.18