OPENF4
Library for Gröebner basis computations over finite fields.
 All Classes Namespaces Files Functions Variables Friends Pages
Public Member Functions | Public Attributes | List of all members
F4::ElementGF2 Class Reference

Represent an element of the field GF(2), this class is a POD (Plain Old Data) because of the alignement required in class Matrix. More...

#include <element-gf2.h>

Public Member Functions

bool getElement ()
 Return this. More...
 
ElementGF2addMult (ElementGF2 const &element, ElementGF2 const &mult)
 Set this+=(mult*element). More...
 
ElementGF2inverse ()
 Inverse this according to the base field (for genericity). More...
 
void printElementGF2 (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.
 
ElementGF2operator= (bool element)
 Overload the operator =. More...
 
ElementGF2operator*= (ElementGF2 const &mult)
 Overload the operator *=. More...
 

Public Attributes

bool _element
 

Detailed Description

Represent an element of the field GF(2), this class is a POD (Plain Old Data) because of the alignement required in class Matrix.

Examples:
tutorial-gf2-method3.cpp.

Definition at line 46 of file element-gf2.h.

Member Function Documentation

ElementGF2& F4::ElementGF2::addMult ( ElementGF2 const &  element,
ElementGF2 const &  mult 
)

Set this+=(mult*element).

Parameters
elementElement of the prime field.
multElement of the field gf2.
Returns
this.
bool F4::ElementGF2::getElement ( )

Return this.

Returns
Integer form of this.
ElementGF2& F4::ElementGF2::inverse ( )

Inverse this according to the base field (for genericity).

Returns
this.
bool F4::ElementGF2::isOne ( ) const

Test if this is one (neutral multiplicative element).

Returns
true if this==one.
false otherwise.
bool F4::ElementGF2::isZero ( ) const

Test if this is nul.

Returns
true if this==zero.
false otherwise.
ElementGF2& F4::ElementGF2::operator*= ( ElementGF2 const &  mult)

Overload the operator *=.

Parameters
elementElement of the field GF(2).
Returns
Reference on this.
ElementGF2& F4::ElementGF2::operator= ( bool  element)

Overload the operator =.

Parameters
elementElement of the field GF(2).
Returns
Reference on this.

Member Data Documentation

bool F4::ElementGF2::_element

Represent an element of the field GF(2)

Definition at line 126 of file element-gf2.h.


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