linbox
Public Types
GivaroField< LinBox::GF2 > Struct Template Reference

give LinBox fields an allure of Givaro FieldsThis class adds the necessary requirements allowing the construction of an extension of a LinBox field. More...

#include <givaro-field-gf2.h>

Inherits GF2.

Public Types

typedef GF2RandIter RandIter
 Random iterator generator type.
 

Public Member Functions

Object Management
Element & init (Element &x, const int &y) const
 Initialization of field base element from an integer.
 
Element & init (Element &x, const unsigned int &y) const
 Default constructor.
 
Element & init (Element &x, const long &y) const
 Default constructor.
 
Element & init (Element &x, const unsigned long &y) const
 Default constructor.
 
Element & init (Element &x, const float &y) const
 Default constructor.
 
Element & init (Element &x, const double &y) const
 Default constructor.
 
Element & init (Element &x, const integer &y) const
 Default constructor.
 
Element & init (Element &x) const
 Default constructor.
 
BitVector::reference init (BitVector::reference x, const integer &y=0) const
 Default constructor.
 
std::_Bit_reference init (std::_Bit_reference x, const integer &y=0) const
 Default constructor.
 
integerconvert (integer &x, Element y) const
 Conversion of field base element to a template class T.
 
std::_Bit_reference convert (std::_Bit_reference x, Element y) const
 Default constructor.
 
template<class XXX >
XXX & convert (XXX &x, Element y) const
 Default constructor.
 
Element & assign (Element &x, Element y) const
 Assignment of one field base element to another.
 
BitVector::reference assign (BitVector::reference x, Element y) const
 Default constructor.
 
std::_Bit_reference assign (std::_Bit_reference x, Element y) const
 Default constructor.
 
integercardinality (integer &c) const
 Cardinality.
 
integercharacteristic (integer &c) const
 Characteristic.
 
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 base elements will give undefined results.

bool areEqual (Element x, Element y) const
 Equality of two elements.
 
bool isZero (Element x) const
 Zero equality.
 
bool isOne (Element x) const
 One equality.
 
Element & add (Element &x, Element y, Element z) const
 Addition.
 
BitVector::reference add (BitVector::reference x, Element y, Element z) const
 Addition.
 
std::_Bit_reference add (std::_Bit_reference x, Element y, Element z) const
 Addition.
 
Element & sub (Element &x, Element y, Element z) const
 Subtraction.
 
BitVector::reference sub (BitVector::reference x, Element y, Element z) const
 Subtraction.
 
std::_Bit_reference sub (std::_Bit_reference x, Element y, Element z) const
 Subtraction.
 
Element & mul (Element &x, Element y, Element z) const
 Multiplication.
 
BitVector::reference mul (BitVector::reference x, Element y, Element z) const
 Multiplication.
 
std::_Bit_reference mul (std::_Bit_reference x, Element y, Element z) const
 Multiplication.
 
Element & div (Element &x, Element y, Element z) const
 Division.
 
BitVector::reference div (BitVector::reference x, Element y, Element z) const
 Division.
 
std::_Bit_reference div (std::_Bit_reference x, Element y, Element z) const
 Division.
 
Element & neg (Element &x, Element y) const
 Additive Inverse (Negation).
 
BitVector::reference neg (BitVector::reference x, Element y) const
 Additive Inverse (Negation).
 
std::_Bit_reference neg (std::_Bit_reference x, Element y) const
 Additive Inverse (Negation).
 
Element & inv (Element &x, Element y) const
 Multiplicative Inverse.
 
BitVector::reference inv (BitVector::reference x, Element y) const
 Multiplicative Inverse.
 
std::_Bit_reference inv (std::_Bit_reference x, Element y) const
 Multiplicative Inverse.
 
BitVector::reference axpy (BitVector::reference r, Element a, Element x, Element y) const
 Natural AXPY.
 
std::_Bit_reference axpy (std::_Bit_reference r, Element a, Element x, Element y) const
 Natural AXPY.
 
Element & axpy (Element &r, Element a, Element x, Element y) const
 Natural AXPY.
 
Input/Output Operations
std::ostream & write (std::ostream &os) const
 Print field.
 
std::ostream & write (std::ostream &os, Element x) const
 Print field base element.
 
std::istream & read (std::istream &is)
 Read field.
 
std::istream & read (std::istream &is, Element &x) const
 Read field base element.
 
std::istream & read (std::istream &is, BitVector::reference x) const
 Read field base element.
 
std::istream & read (std::istream &is, std::_Bit_reference x) const
 Read field base element.
 
Inplace Arithmetic Operations

x <- x op y; x <- op x

Element & addin (Element &x, Element y) const
 Inplace Addition.
 
BitVector::reference addin (BitVector::reference x, Element y) const
 Inplace Addition.
 
std::_Bit_reference addin (std::_Bit_reference x, Element y) const
 Inplace Addition.
 
Element & subin (Element &x, Element y) const
 Inplace Subtraction.
 
BitVector::reference subin (BitVector::reference x, Element y) const
 Inplace Subtraction.
 
std::_Bit_reference subin (std::_Bit_reference x, Element y) const
 Inplace Subtraction.
 
Element & mulin (Element &x, Element y) const
 Inplace Multiplication.
 
BitVector::reference mulin (BitVector::reference x, Element y) const
 Inplace Multiplication.
 
std::_Bit_reference mulin (std::_Bit_reference x, Element y) const
 Inplace Multiplication.
 
Element & divin (Element &x, Element y) const
 Inplace Division.
 
BitVector::reference divin (BitVector::reference x, Element y) const
 Inplace Division.
 
std::_Bit_reference divin (std::_Bit_reference x, Element y) const
 Inplace Division.
 
Element & negin (Element &x) const
 Inplace Additive Inverse (Inplace Negation).
 
BitVector::reference negin (BitVector::reference x) const
 Inplace Additive Inplace (Inplace Negation).
 
std::_Bit_reference negin (std::_Bit_reference x) const
 Inplace Additive Inplace (Inplace Negation).
 
Element & invin (Element &x) const
 Inplace Multiplicative Inverse.
 
BitVector::reference invin (BitVector::reference x) const
 Inplace Multiplicative Inverse.
 
std::_Bit_reference invin (std::_Bit_reference x) const
 Inplace Multiplicative Inverse.
 
Element & axpyin (Element &r, Element a, Element x) const
 Inplace AXPY.
 
BitVector::reference axpyin (BitVector::reference r, Element a, Element x) const
 Inplace AXPY.
 
std::_Bit_reference axpyin (std::_Bit_reference r, Element a, Element x) const
 Inplace AXPY.
 
Element & axpyin (Element &r, const std::_Bit_reference a, Element x) const
 Inplace AXPY.
 
std::_Bit_reference axpyin (std::_Bit_reference r, const std::_Bit_reference a, Element x) const
 Inplace AXPY.
 
Element & axpyin (Element &r, Element a, const std::_Bit_reference x) const
 Inplace AXPY.
 
std::_Bit_reference axpyin (std::_Bit_reference r, Element a, const std::_Bit_reference x) const
 Inplace AXPY.
 
Element & axpyin (Element &r, const std::_Bit_reference a, const std::_Bit_reference x) const
 Inplace AXPY.
 
std::_Bit_reference axpyin (std::_Bit_reference r, const std::_Bit_reference a, const std::_Bit_reference x) const
 Inplace AXPY.
 

Detailed Description

template<>
struct LinBox::GivaroField< LinBox::GF2 >

give LinBox fields an allure of Givaro Fields

This class adds the necessary requirements allowing the construction of an extension of a LinBox field.

Member Typedef Documentation

typedef GF2RandIter RandIter
inherited

Random iterator generator type.

It must meet the common object interface of random element generators as given in the the archetype RandIterArchetype.

Member Function Documentation

Element& init ( Element &  x,
const int &  y 
) const
inlineinherited

Initialization of field base element from an integer.

Behaves like C++ allocator construct. This function assumes the output field base element x has already been constructed, but that it is not already initialized. This is not a specialization of the template function because such a specialization is not allowed inside the class declaration.

Returns
reference to field base element.
Parameters
xfield base element to contain output (reference returned).
yinteger.
integer& convert ( integer x,
Element  y 
) const
inlineinherited

Conversion of field base element to a template class T.

This function assumes the output field base element x has already been constructed, but that it is not already initialized.

Returns
reference to template class T.
Parameters
xtemplate class T to contain output (reference returned).
yconstant field base element.
Element& assign ( Element &  x,
Element  y 
) const
inlineinherited

Assignment of one field base element to another.

This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x
Parameters
xfield base element (reference returned).
yfield base element.
integer& cardinality ( integer c) const
inlineinherited

Cardinality.

Return integer representing cardinality of the domain. Returns a non-negative integer for all domains with finite cardinality, and returns -1 to signify a domain of infinite cardinality.

Returns
integer representing cardinality of the domain
integer& characteristic ( integer c) const
inlineinherited

Characteristic.

Return integer representing characteristic of the domain. Returns a positive integer to all domains with finite characteristic, and returns 0 to signify a domain of infinite characteristic.

Returns
integer representing characteristic of the domain.
bool areEqual ( Element  x,
Element  y 
) const
inlineinherited

Equality of two elements.

This function assumes both field base elements have already been constructed and initialized.

Returns
boolean true if equal, false if not.
Parameters
xfield base element
yfield base element
bool isZero ( Element  x) const
inlineinherited

Zero equality.

Test if field base element is equal to zero. This function assumes the field base element has already been constructed and initialized.

Returns
boolean true if equals zero, false if not.
Parameters
xfield base element.
bool isOne ( Element  x) const
inlineinherited

One equality.

Test if field base element is equal to one. This function assumes the field base element has already been constructed and initialized.

Returns
boolean true if equals one, false if not.
Parameters
xfield base element.
std::ostream& write ( std::ostream &  os) const
inlineinherited

Print field.

Returns
output stream to which field is written.
Parameters
osoutput stream to which field is written.
std::ostream& write ( std::ostream &  os,
Element  x 
) const
inlineinherited

Print field base element.

This function assumes the field base element has already been constructed and initialized.

Returns
output stream to which field base element is written.
Parameters
osoutput stream to which field base element is written.
xfield base element.
std::istream& read ( std::istream &  is)
inlineinherited

Read field.

Returns
input stream from which field is read.
Parameters
isinput stream from which field is read.
std::istream& read ( std::istream &  is,
Element &  x 
) const
inlineinherited

Read field base element.

Precondition
This function assumes the field base element has already been constructed and initialized.
Returns
input stream from which field base element is read.
Parameters
isinput stream from which field base element is read.
xfield base element.
std::istream& read ( std::istream &  is,
BitVector::reference  x 
) const
inlineinherited

Read field base element.

Parameters
isinput stream
x
Returns
is
std::istream& read ( std::istream &  is,
std::_Bit_reference  x 
) const
inlineinherited

Read field base element.

Parameters
isinput stream
x
Returns
is
Element& add ( Element &  x,
Element  y,
Element  z 
) const
inlineinherited

Addition.

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

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
zfield base element.
BitVector::reference add ( BitVector::reference  x,
Element  y,
Element  z 
) const
inlineinherited

Addition.

Parameters
x
y
z
std::_Bit_reference add ( std::_Bit_reference  x,
Element  y,
Element  z 
) const
inlineinherited

Addition.

Parameters
x
y
z
Element& sub ( Element &  x,
Element  y,
Element  z 
) const
inlineinherited

Subtraction.

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

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
zfield base element.
BitVector::reference sub ( BitVector::reference  x,
Element  y,
Element  z 
) const
inlineinherited

Subtraction.

Parameters
x
y
z
std::_Bit_reference sub ( std::_Bit_reference  x,
Element  y,
Element  z 
) const
inlineinherited

Subtraction.

Parameters
x
y
z
Element& mul ( Element &  x,
Element  y,
Element  z 
) const
inlineinherited

Multiplication.

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

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
zfield base element.
BitVector::reference mul ( BitVector::reference  x,
Element  y,
Element  z 
) const
inlineinherited

Multiplication.

Parameters
x
y
z
std::_Bit_reference mul ( std::_Bit_reference  x,
Element  y,
Element  z 
) const
inlineinherited

Multiplication.

Parameters
x
y
z
Element& div ( Element &  x,
Element  y,
Element  z 
) const
inlineinherited

Division.

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

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
zfield base element.
Bug:
z is unused
BitVector::reference div ( BitVector::reference  x,
Element  y,
Element  z 
) const
inlineinherited

Division.

Parameters
x
y
z
std::_Bit_reference div ( std::_Bit_reference  x,
Element  y,
Element  z 
) const
inlineinherited

Division.

Parameters
x
y
z
Element& neg ( Element &  x,
Element  y 
) const
inlineinherited

Additive Inverse (Negation).

x = - y This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
BitVector::reference neg ( BitVector::reference  x,
Element  y 
) const
inlineinherited

Additive Inverse (Negation).

Returns
reference to x.
Parameters
x
y
std::_Bit_reference neg ( std::_Bit_reference  x,
Element  y 
) const
inlineinherited

Additive Inverse (Negation).

Returns
reference to x.
Parameters
x
y
Element& inv ( Element &  x,
Element  y 
) const
inlineinherited

Multiplicative Inverse.

x = 1 / y This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
BitVector::reference inv ( BitVector::reference  x,
Element  y 
) const
inlineinherited

Multiplicative Inverse.

Returns
reference to x.
Parameters
x
y
std::_Bit_reference inv ( std::_Bit_reference  x,
Element  y 
) const
inlineinherited

Multiplicative Inverse.

Returns
reference to x.
Parameters
x
y
BitVector::reference axpy ( BitVector::reference  r,
Element  a,
Element  x,
Element  y 
) const
inlineinherited

Natural AXPY.

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

Returns
reference to r.
Parameters
rfield element (reference returned).
afield element.
xfield element.
yfield element.
std::_Bit_reference axpy ( std::_Bit_reference  r,
Element  a,
Element  x,
Element  y 
) const
inlineinherited

Natural AXPY.

Returns
reference to r.
Parameters
r
a
x
y
Element& axpy ( Element &  r,
Element  a,
Element  x,
Element  y 
) const
inlineinherited

Natural AXPY.

Returns
reference to r.
Parameters
r
a
x
y
Element& addin ( Element &  x,
Element  y 
) const
inlineinherited

Inplace Addition.

x += y This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
BitVector::reference addin ( BitVector::reference  x,
Element  y 
) const
inlineinherited

Inplace Addition.

Returns
reference to x.
Parameters
x
y
std::_Bit_reference addin ( std::_Bit_reference  x,
Element  y 
) const
inlineinherited

Inplace Addition.

Returns
reference to x.
Parameters
x
y
Element& subin ( Element &  x,
Element  y 
) const
inlineinherited

Inplace Subtraction.

x -= y This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
BitVector::reference subin ( BitVector::reference  x,
Element  y 
) const
inlineinherited

Inplace Subtraction.

Returns
reference to x.
Parameters
x
y
std::_Bit_reference subin ( std::_Bit_reference  x,
Element  y 
) const
inlineinherited

Inplace Subtraction.

Returns
reference to x.
Parameters
x
y
Element& mulin ( Element &  x,
Element  y 
) const
inlineinherited

Inplace Multiplication.

x *= y This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
BitVector::reference mulin ( BitVector::reference  x,
Element  y 
) const
inlineinherited

Inplace Multiplication.

Returns
reference to x.
Parameters
x
y
std::_Bit_reference mulin ( std::_Bit_reference  x,
Element  y 
) const
inlineinherited

Inplace Multiplication.

Returns
reference to x.
Parameters
x
y
Element& divin ( Element &  x,
Element  y 
) const
inlineinherited

Inplace Division.

x /= y This function assumes both field base elements have already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
yfield base element.
Bug:
y is unused
BitVector::reference divin ( BitVector::reference  x,
Element  y 
) const
inlineinherited

Inplace Division.

Returns
reference to x.
Parameters
x
y
Bug:
y is unused
std::_Bit_reference divin ( std::_Bit_reference  x,
Element  y 
) const
inlineinherited

Inplace Division.

Returns
reference to x.
Parameters
x
y
Bug:
y is unused
Element& negin ( Element &  x) const
inlineinherited

Inplace Additive Inverse (Inplace Negation).

x = - x This function assumes the field base element has already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
BitVector::reference negin ( BitVector::reference  x) const
inlineinherited

Inplace Additive Inplace (Inplace Negation).

Returns
reference to x.
Parameters
x
Bug:
y is unused
std::_Bit_reference negin ( std::_Bit_reference  x) const
inlineinherited

Inplace Additive Inplace (Inplace Negation).

Returns
reference to x.
Parameters
x
Bug:
y is unused
Element& invin ( Element &  x) const
inlineinherited

Inplace Multiplicative Inverse.

x = 1 / x This function assumes the field base elementhas already been constructed and initialized.

Returns
reference to x.
Parameters
xfield base element (reference returned).
BitVector::reference invin ( BitVector::reference  x) const
inlineinherited

Inplace Multiplicative Inverse.

Returns
reference to x.
Parameters
x
std::_Bit_reference invin ( std::_Bit_reference  x) const
inlineinherited

Inplace Multiplicative Inverse.

Returns
reference to x.
Parameters
x
Element& axpyin ( Element &  r,
Element  a,
Element  x 
) const
inlineinherited

Inplace AXPY.

r += a * x This function assumes all field elements have already been constructed and initialized. Purely virtual

Returns
reference to r.
Parameters
rfield element (reference returned).
afield element.
xfield element.
BitVector::reference axpyin ( BitVector::reference  r,
Element  a,
Element  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
std::_Bit_reference axpyin ( std::_Bit_reference  r,
Element  a,
Element  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
Element& axpyin ( Element &  r,
const std::_Bit_reference  a,
Element  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
std::_Bit_reference axpyin ( std::_Bit_reference  r,
const std::_Bit_reference  a,
Element  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
Element& axpyin ( Element &  r,
Element  a,
const std::_Bit_reference  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
std::_Bit_reference axpyin ( std::_Bit_reference  r,
Element  a,
const std::_Bit_reference  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
Element& axpyin ( Element &  r,
const std::_Bit_reference  a,
const std::_Bit_reference  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x
std::_Bit_reference axpyin ( std::_Bit_reference  r,
const std::_Bit_reference  a,
const std::_Bit_reference  x 
) const
inlineinherited

Inplace AXPY.

Returns
reference to r.
Parameters
r
a
x

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