F4
Library for Gröebner basis computation in finite field.
 All Classes Namespaces Files Functions Variables Friends
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
F4::ElementGivaro< Field > Class Template Reference

#include <element-givaro.h>

Public Member Functions

ElementGivaro< Field > & addMult (ElementGivaro< Field > const &element, ElementGivaro< Field > const &mult)
 Set this+=(mult*element). More...
 
ElementGivaro< Field > & inverse ()
 Inverse this according to the base field. More...
 
void printElementPrime (std::ostream &stream) const
 Print the element.
 
bool isZero () const
 Test if this is nul. More...
 
bool isOne () const
 Test if this is one (neutral multiplicative element). More...
 
void setZero ()
 Set the element to zero.
 
void setOne ()
 Set the element to one.
 
ElementGivarooperator= (typename Field::Element element)
 Overload the operator =. More...
 
ElementGivarooperator= (int element)
 Overload the operator =. More...
 
ElementGivarooperator= (long element)
 Overload the operator =. More...
 
ElementGivarooperator= (std::string element)
 Overload the operator =. More...
 
ElementGivarooperator*= (ElementGivaro const &mult)
 Overload the operator *=. More...
 
ElementGivarooperator-= (ElementGivaro const &element)
 Overload the operator -. More...
 

Static Public Member Functions

static void setField (Field &field)
 Set the base field. More...
 

Public Attributes

Field::Element _element
 

Static Public Attributes

static Field F
 

Detailed Description

template<class Field>
class F4::ElementGivaro< Field >

Represent an element of a prime field with zech logarithm tables, this class is a POD (Plain Old Data) because of the alignement required in class Matrix.

Examples:
tutorial-big-modulo-method3.cpp.

Member Function Documentation

template<class Field>
ElementGivaro<Field>& F4::ElementGivaro< Field >::addMult ( ElementGivaro< Field > const &  element,
ElementGivaro< Field > const &  mult 
)

Set this+=(mult*element).

Parameters
elementElement of the prime field.
multElement of the prime field.
Returns
this.
template<class Field>
ElementGivaro<Field>& F4::ElementGivaro< Field >::inverse ( )

Inverse this according to the base field.

Precondition
The static variable F must be set beforehand.
Returns
this.
template<class Field>
bool F4::ElementGivaro< Field >::isOne ( ) const

Test if this is one (neutral multiplicative element).

Returns
true if this==one.
false otherwise.
template<class Field>
bool F4::ElementGivaro< Field >::isZero ( ) const

Test if this is nul.

Returns
true if this==zero.
false otherwise.
template<class Field>
ElementGivaro& F4::ElementGivaro< Field >::operator*= ( ElementGivaro< Field > const &  mult)

Overload the operator *=.

Precondition
The static variable F must be set beforehand.
Parameters
elementElement of a prime field.
Returns
Reference on this.
template<class Field>
ElementGivaro& F4::ElementGivaro< Field >::operator-= ( ElementGivaro< Field > const &  element)

Overload the operator -.

Precondition
The static variable F must be set beforehand.
Parameters
elementElement of a prime field.
Postcondition
This is set to -element.
Returns
Reference on this.
template<class Field>
ElementGivaro& F4::ElementGivaro< Field >::operator= ( typename Field::Element  element)

Overload the operator =.

Precondition
The static variable F must be set beforehand.
Parameters
elementElement of a prime field.
Returns
Reference on this.
template<class Field>
ElementGivaro& F4::ElementGivaro< Field >::operator= ( int  element)

Overload the operator =.

Precondition
The static variable F must be set beforehand.
Parameters
elementInteger representing an element of a prime field.
Returns
Reference on this.
template<class Field>
ElementGivaro& F4::ElementGivaro< Field >::operator= ( long  element)

Overload the operator =.

Precondition
The static variable F must be set beforehand.
Parameters
elementInteger representing an element of a prime field.
Returns
Reference on this.
template<class Field>
ElementGivaro& F4::ElementGivaro< Field >::operator= ( std::string  element)

Overload the operator =.

Precondition
The static variable F must be set beforehand.
Parameters
elementBig integer (gmp) under string representation.
Returns
Reference on this.
template<class Field>
static void F4::ElementGivaro< Field >::setField ( Field &  field)
static

Set the base field.

Parameters
fieldGivaro modular-log base field.

Member Data Documentation

template<class Field>
Field::Element F4::ElementGivaro< Field >::_element

Represent an element of the field of characteristic MODULO

template<class Field>
Field F4::ElementGivaro< Field >::F
static

Base field.


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