26 #ifndef OPENF4_ELEMENT_GF2_EXTENSION_H
27 #define OPENF4_ELEMENT_GF2_EXTENSION_H
47 template <
typename baseType>
64 static void setModulo(std::string modulo);
289 template <
typename baseType>
290 std::ostream & operator<<(std::ostream & stream, ElementGF2Extension<baseType>
const & element);
296 template <
typename baseType>
303 template <
typename baseType>
308 #include "../src/element-gf2-extension.inl"
311 #endif // OPENF4_ELEMENT_GF2_EXTENSION_H
ElementGF2Extension & multBase256(ElementGF2Extension const &mult)
Multiply this by mult using base256 decomposition.
ElementGF2Extension & multBase4(ElementGF2Extension const &mult)
Multiply this by mult using base4 decomposition.
ElementGF2Extension & operator*=(ElementGF2Extension const &mult)
Overload the operator *=.
void setZero()
Set the element to zero.
ElementPrime< baseType > operator-(ElementPrime< baseType > const &element)
Overload the operator -.
void printElementGF2Extension(std::ostream &stream) const
Print the element.
ElementGF2Extension< baseType > & addMultBase256(ElementGF2Extension< baseType > const &element, ElementGF2Extension< baseType > const &mult)
Set this+=(mult*element). Use a base of 256.
static std::string VARIABLE_NAME
static void setVariableName(std::string var)
Set the static variable VARIABLE_NAME.
Wrapper for config.h in order to avoid multiple definitions.
bool isZero() const
Test if this is nul.
ElementGF2Extension< baseType > & addMultBase2(ElementGF2Extension< baseType > const &element, ElementGF2Extension< baseType > const &mult)
Set this+=(mult*element). Use a base of 2.
ElementGF2Extension< baseType > & inverse()
Inverse this according to the base field.
Term< Element > operator*(Monomial const &mon, Term< Element > const &term)
Overload the operator *.
Represent an element of an extension of GF2, this class is a POD (Plain Old Data) because of the alig...
void setOne()
Set the element to one.
ElementGF2Extension & multBase2(ElementGF2Extension const &mult)
Multiply this by mult using base2 decomposition.
ElementGF2Extension & operator=(baseType const element)
Overload the operator =.
static void setModulo(baseType modulo)
Set the static variable MODULO.
ElementGF2Extension< baseType > & addMult(ElementGF2Extension< baseType > const &element, ElementGF2Extension< baseType > const &mult)
Set this+=(mult*element).
baseType getElement() const
Return this.
bool isOne() const
Test if this is one (neutral multiplicative element).
baseType modulo()
Set this with a degree lower than MODULO.
ElementGF2Extension< baseType > & addMultBase4(ElementGF2Extension< baseType > const &element, ElementGF2Extension< baseType > const &mult)
Set this+=(mult*element). Use a base of 4.
static baseType getMask()
Get the static variable MASK.
ElementGF2Extension< baseType > & addMultBase16(ElementGF2Extension< baseType > const &element, ElementGF2Extension< baseType > const &mult)
Set this+=(mult*element). Use a base of 16.
static baseType getModulo()
Get the static variable MODULO.
ElementGF2Extension & multBase16(ElementGF2Extension const &mult)
Multiply this by mult using base16 decomposition.
static baseType getMaskBit()
Get the static variable MASK_BIT.