24 #include "system_constants.hpp" 170 COEF_TYPE value()
const;
180 inline bool is_zero()
const {
return a == 0; };
188 a = val; F = K;
m = F->modulus();
219 void operator *=(
const COEF_TYPE b);
COEF_TYPE * Fi
for , is multiplicative inverse of , mod
ray operator-(const ray &r1, const ray &r2)
Subtract the two rays.
unsigned m
the number’ modulus, stored here to avoid the expense of accessing it in .
ray operator+(ray &r1, ray &r2)
Add the two rays.
bool is_zero() const
Is this the additive identity?
Prime_Field_Element zero()
“zero” is the additive identity.
Information necessary for a field modulo a prime.
UCOEF_TYPE m
characteristic/modulus of the field
bool get_print_modulus()
indicates whether to print the modulus
Prime_Field_Element unity()
“unity” is the multiplicative identity.
COEF_TYPE inverse(COEF_TYPE a)
Returns the inverse of , modulo .
ray operator*(RAYENT_TYPE a, ray &r)
Multiply every coordinate in the given ray by the given scalar.
bool print_modulus
determines whether a coefficient's modulus is printed
COEF_TYPE a
the number’s value; descendants should ensure
unsigned modulus() const
Returns the field's modulus.
Prime_Field(UCOEF_TYPE modulus, bool show_modulus=false)
Please read detailed information.
Element of a field of prime characteristic.
Prime_Field * F
the field this element lives in; used to find inverses
void set_print_modulus(bool b)
determines whether to print the modulus
void assign(COEF_TYPE val, Prime_Field *K)
for initializing arrays of Prime_Field_Element