Represent an element of a prime field, this class is a POD (Plain Old Data) because of the alignement required in class Matrix.
More...
#include <element-prime.h>
template<typename baseType>
class F4::ElementPrime< baseType >
Represent an element of a prime field, this class is a POD (Plain Old Data) because of the alignement required in class Matrix.
- Examples:
- tutorial-method3.cpp.
Definition at line 47 of file element-prime.h.
template<typename baseType>
Set this+=(mult*element).
- Parameters
-
element | Element of the prime field. |
mult | Element of the prime field. |
- Precondition
- mult is set in [-MODULO/2, MODULO/2].
-
element is set in [-MODULO/2, MODULO/2].
- Postcondition
- this is set in [-MAX, MAX].
- Returns
- this.
template<typename baseType>
Return this.
- Returns
- Integer form of this.
template<typename baseType>
Get the static variable MAX.
- Returns
- Maximum range for the baseType elements.
template<typename baseType>
Get the static variable MODULO.
- Returns
- Characteristic of the base field.
template<typename baseType>
Inverse this according to the base field.
- Precondition
- The static variable MODULO must be set beforehand. Beware, baseType must be signed.
- Postcondition
- this is set in [-MODULO/2, MODULO/2].
- Returns
- this.
template<typename baseType>
Test if this is one (neutral multiplicative element).
- Returns
- true if this==one.
-
false otherwise.
template<typename baseType>
Test if this is nul.
- Returns
- true if this==zero.
-
false otherwise.
template<typename baseType>
Set this in [-MODULO/2, MODULO/2].
- Postcondition
- this is set in [-MODULO/2, MODULO/2].
- Returns
- Integer form of this.
template<typename baseType>
Overload the operator *=.
- Precondition
- The static variable MODULO must be set beforehand.
- Parameters
-
element | Element of a prime field. |
- Precondition
- mult is set in [-MODULO/2, MODULO/2].
- Postcondition
- this is set in [-MODULO/2, MODULO/2].
- Returns
- Reference on this.
template<typename baseType>
Overload the operator =.
- Precondition
- The static variable MODULO must be set beforehand.
- Parameters
-
element | Element of a prime field. |
- Returns
- Reference on this.
template<typename baseType>
Set the static variable MODULO.
- Parameters
-
modulo | Characteristic of the base field. |
template<typename baseType>
Represent an element of the field of characteristic MODULO
Definition at line 164 of file element-prime.h.
template<typename baseType>
template<typename baseType>
The documentation for this class was generated from the following file: