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

LidiaGfq Class Reference

#include <lidia-gfq.h>

Inheritance diagram for LidiaGfq:

FieldInterface List of all members.

Public Types

typedef gf_element Element
typedef LidiaGfqRandIter<
LidiaGfq > 
RandIter

Public Methods

 LidiaGfq ()
 LidiaGfq (const integer &p, const integer &k=1)
 Constructor of GF(p^k). @doc A GF(p^k) field is constructed through the constructor of LiDIA galois_field We need a double cast to pass integer arguments to the LiDIA constructor.

 LidiaGfq (const LidiaGfq &F)
 ~LidiaGfq ()
LidiaGfq & operator= (const LidiaGfq &F)
Object management
Element & init (Element &x, const integer &y=0) const
integer & convert (integer &x, const Element &y) const
Element & assign (Element &x, const Element &y) const
integer & cardinality (integer &c) const
integer & characteristic (integer &c) const
Arithmetic Operations
x <- y op z; x <- op y These operations require all Elements, including x, to be initialized before the operation is called. Uninitialized field Elements will give undefined results.

Object Management bool areEqual (const Element &x, const Element &y) 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
bool isZero (const Element &x) const
bool isOne (const Element &x) 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
Input/Output Operations
Inplace Arithmetic Operations
std::ostream & 
write (std::ostream &os) const
std::istream & read (std::istream &is) const
std::ostream & write (std::ostream &os, const Element &e) const
std::istream & read (std::istream &is, Element &e) const

Static Public Methods

integer getMaxModulus ()

Member Typedef Documentation

typedef gf_element Element
 

Element type. This type is inherited from the LiDIA class gf_element

typedef LidiaGfqRandIter<LidiaGfq> RandIter
 

Random element generator which is define in the wrapper LIDIA_randiter


Constructor & Destructor Documentation

LidiaGfq (    )  [inline]
 

Default constructor of the field

LidiaGfq (  const integer &    p,
const integer &    k = 1
)  [inline]
 

Constructor of GF(p^k). @doc A GF(p^k) field is constructed through the constructor of LiDIA galois_field We need a double cast to pass integer arguments to the LiDIA constructor.

LidiaGfq (  const LidiaGfq &    F )  [inline]
 

Copy constructor

~LidiaGfq (    )  [inline]
 

Destructor


Member Function Documentation

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

Addition. x = y + z This function assumes all the field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.
z  field Element.

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

Inplace Addition. x += y This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.

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

Equality of two Elements. This function assumes both field Elements have already been constructed and initialized.

Returns:
boolean true if equal, false if not.
Parameters:
x  field Element
y  field Element

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

Assignment of one field Element to another. This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x
Parameters:
x  field Element (reference returned).
y  field Element.

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

Natural AXPY. r = a * x + y This function assumes all field Elements have already been constructed and initialized.

Returns:
reference to r.
Parameters:
r  field Element (reference returned).
a  field Element.
x  field Element.
y  field Element.

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

Inplace AXPY. r += a * x This function assumes all field Elements have already been constructed and initialized.

Returns:
reference to r.
Parameters:
r  field Element (reference returned).
a  field Element.
x  field Element.

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

Cardinality. Return integer representing cardinality of the field. Returns p^k.

Returns:
constant reference to integer representing cardinality of the field.

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

Characteristic. Return integer representing characteristic of the field. Returns p.

Returns:
constant reference to integer representing characteristic of the field.

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

Conversion of field base Element to an integer. This function assumes the output field base Element x has already been constructed, but that it is not already initialized. As Elements are represented by polynom the convert function return the valuation of polynom in characteristic by the Horner Method. That keeps unicity of each Element.

Returns:
reference to an integer.
Parameters:
x  integer to contain output (reference returned).
y  constant field base Element.

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

Division. x = y / z This function assumes all the field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.
z  field Element.

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

Inplace Division. x /= y This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.

integer getMaxModulus (    )  [inline, static]
 

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

Initialization of field Element from an integer. Behaves like C++ allocator construct. This function assumes the output field Element x has already been constructed, but that it is not already initialized. We also need to define the Element over the field. So what we always initialize the Element with the zero field value. If an integer different from zero is passed to the function the Element is initialized to a constant polynom of Z/pZ

Returns:
reference to field Element.
Parameters:
x  field Element to contain output (reference returned).
y  integer.

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

Multiplicative Inverse. x = 1 / y This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.

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

Inplace Multiplicative Inverse. x = 1 / x This function assumes the field Elementhas already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).

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

One equality. Test if field Element is equal to one of field. This function assumes the field Element has already been constructed and initialized.

Returns:
boolean true if equals one of field, false if not.
Parameters:
x  field Element.

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

Zero equality. Test if field Element is equal to zero of field. This function assumes the field Element has already been constructed and initialized.

Returns:
boolean true if equals zero of field, false if not.
Parameters:
x  field Element.

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

Multiplication. x = y * z This function assumes all the field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.
z  field Element.

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

Inplace Multiplication. x *= y This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.

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

Additive Inverse (Negation). x = - y This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.

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

Inplace Additive Inverse (Inplace Negation). x = - x This function assumes the field Element has already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).

LidiaGfq& operator= (  const LidiaGfq &    F )  [inline]
 

Assignment operator. Assigns unparam_field object F to field.

Parameters:
F  unparam_field object.

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

Read field Element.

Returns:
input stream from which field Element is read.
Parameters:
is  input stream from which field Element is read.
x  field Element.

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

Read field.

Returns:
input stream from which field is read.
Parameters:
is  input stream from which field is read.

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

Subtraction. x = y - z This function assumes all the field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.
z  field Element.

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

Inplace Subtraction. x -= y This function assumes both field Elements have already been constructed and initialized.

Returns:
reference to x.
Parameters:
x  field Element (reference returned).
y  field Element.

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

Print field Element like a polynom.

Returns:
output stream to which field Element is written.
Parameters:
os  output stream to which field Element is written.
x  field Element.

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

Print field.

Returns:
output stream to which field is written.
Parameters:
os  output stream to which field is written.


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