26 #ifndef OPENF4_ELEMENT_PRIME_H
27 #define OPENF4_ELEMENT_PRIME_H
46 template <
typename baseType>
177 template <
typename baseType>
178 std::ostream & operator<<(std::ostream & stream, ElementPrime<baseType>
const & element);
184 template <
typename baseType>
191 template <
typename baseType>
196 #include "../src/element-prime.inl"
199 #endif // OPENF4_ELEMENT_PRIME_H
static baseType getModulo()
Get the static variable MODULO.
void setZero()
Set the element to zero.
static baseType getMax()
Get the static variable MAX.
ElementPrime< baseType > operator-(ElementPrime< baseType > const &element)
Overload the operator -.
bool isOne() const
Test if this is one (neutral multiplicative element).
ElementPrime & operator=(baseType element)
Overload the operator =.
ElementPrime< baseType > & addMult(ElementPrime< baseType > const &element, ElementPrime< baseType > const &mult)
Set this+=(mult*element).
baseType modulo()
Set this in [-MODULO/2, MODULO/2].
ElementPrime< baseType > & inverse()
Inverse this according to the base field.
Wrapper for config.h in order to avoid multiple definitions.
void printElementPrime(std::ostream &stream) const
Print the element.
Term< Element > operator*(Monomial const &mon, Term< Element > const &term)
Overload the operator *.
Represent an element of a prime field, this class is a POD (Plain Old Data) because of the alignement...
ElementPrime & operator*=(ElementPrime const &mult)
Overload the operator *=.
void setOne()
Set the element to one.
static void setModulo(baseType modulo)
Set the static variable MODULO.
bool isZero() const
Test if this is nul.
baseType getElement()
Return this.