linbox
1
|
defines the Galois Field GF(pk). More...
#include <lidia-gfq.h>
Public Types | |
typedef LiDIA::gf_element | Element |
typedef LidiaGfqRandIter < LidiaGfq > | RandIter |
Public Member Functions | |
LidiaGfq () | |
LidiaGfq (const integer &p, const integer &k=1) | |
Constructor of GF(p^k). | |
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. | |
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 | |
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 |
defines the Galois Field GF(pk).
Inherits from galois of LiDIA. p must be prime.
typedef LiDIA::gf_element Element |
Element type. This type is inherited from the LiDIA class LiDIA::gf_element
Random element generator which is define in the wrapper LIDIA_randiter
LidiaGfq | ( | ) | [inline] |
Default constructor of the field
Constructor of GF(p^k).
A GF(p^k) field is constructed through the constructor of LiDIA LiDIA::galois_field We need a double cast to pass integer arguments to the LiDIA constructor
~LidiaGfq | ( | ) | [inline] |
Destructor
Assignment operator. Assigns unparam_field object F to field.
F | unparam_field object. |
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
x | field Element to contain output (reference returned). |
y | integer. |
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.
x | integer to contain output (reference returned). |
y | constant field base Element. |
Assignment of one field Element to another. This function assumes both field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
integer& cardinality | ( | integer & | c | ) | const [inline] |
Cardinality. Return integer representing cardinality of the field. Returns p^k.
integer& characteristic | ( | integer & | c | ) | const [inline] |
Characteristic. Return integer representing characteristic of the field. Returns p.
Equality of two Elements. This function assumes both field Elements have already been constructed and initialized.
x | field Element |
y | field Element |
Addition. x = y + z This function assumes all the field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
z | field Element. |
Subtraction. x = y - z This function assumes all the field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
z | field Element. |
Multiplication. x = y * z This function assumes all the field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
z | field Element. |
Division. x = y / z This function assumes all the field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
z | field Element. |
Additive Inverse (Negation). x = - y This function assumes both field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
Multiplicative Inverse. x = 1 / y This function assumes both field Elements have already been constructed and initialized.
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.
r | field Element (reference returned). |
a | field Element. |
x | field Element. |
y | field Element. |
Zero equality. Test if field Element is equal to zero of field. This function assumes the field Element has already been constructed and initialized.
x | field Element. |
One equality. Test if field Element is equal to one of field. This function assumes the field Element has already been constructed and initialized.
x | field Element. |
Inplace Addition. x += y This function assumes both field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
Inplace Subtraction. x -= y This function assumes both field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
Inplace Multiplication. x *= y This function assumes both field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
Inplace Division. x /= y This function assumes both field Elements have already been constructed and initialized.
x | field Element (reference returned). |
y | field Element. |
Inplace Additive Inverse (Inplace Negation). x = - x This function assumes the field Element has already been constructed and initialized.
x | field Element (reference returned). |
Inplace Multiplicative Inverse. x = 1 / x This function assumes the field Elementhas already been constructed and initialized.
x | field Element (reference returned). |
Inplace AXPY. r += a * x This function assumes all field Elements have already been constructed and initialized.
r | field Element (reference returned). |
a | field Element. |
x | field Element. |
std::ostream& write | ( | std::ostream & | os | ) | const [inline] |
Print field.
os | output stream to which field is written. |
std::istream& read | ( | std::istream & | is | ) | const [inline] |
Read field.
is | input stream from which field is read. |
Print field Element like a polynom.
os | output stream to which field Element is written. |
x | field Element. |
Read field Element.
is | input stream from which field Element is read. |
x | field Element. |