Trait fff::Field [−][src]
pub trait Field: Sized + Eq + Copy + Clone + Send + Sync + Debug + Display + 'static + Serialize + Deserialize<'static> {}Show methods
fn random<R: RngCore>(rng: &mut R) -> Self; fn zero() -> Self; fn one() -> Self; fn is_zero(&self) -> bool; fn square(&mut self); fn double(&mut self); fn negate(&mut self); fn add_assign(&mut self, other: &Self); fn sub_assign(&mut self, other: &Self); fn mul_assign(&mut self, other: &Self); fn inverse(&self) -> Option<Self>; fn frobenius_map(&mut self, power: usize); fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self { ... }
Expand description
This trait represents an element of a field.
Required methods
fn random<R: RngCore>(rng: &mut R) -> Self
[src]
fn random<R: RngCore>(rng: &mut R) -> Self
[src]Returns an element chosen uniformly at random using a user-provided RNG.
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign(&mut self, other: &Self)
[src]Adds another element to this element.
fn sub_assign(&mut self, other: &Self)
[src]
fn sub_assign(&mut self, other: &Self)
[src]Subtracts another element from this element.
fn mul_assign(&mut self, other: &Self)
[src]
fn mul_assign(&mut self, other: &Self)
[src]Multiplies another element by this element.
fn inverse(&self) -> Option<Self>
[src]
fn inverse(&self) -> Option<Self>
[src]Computes the multiplicative inverse of this element, if nonzero.
fn frobenius_map(&mut self, power: usize)
[src]
fn frobenius_map(&mut self, power: usize)
[src]Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism.