pub struct PrimeField<const P: u64>(/* private fields */);Expand description
An element of GF(P) for a prime P fixed at compile time.
Implementations§
Trait Implementations§
impl<const P: u64> Copy for Gf<P>
impl<const P: u64> Eq for Gf<P>
Source§impl<const P: u64> F4Field for PrimeField<P>
impl<const P: u64> F4Field for PrimeField<P>
Source§fn echelonize_traced(
pivots: &Reducers<Self>,
rows: &[SparseRow<Self>],
ncols: usize,
) -> (Vec<SparseRow<Self>>, Vec<usize>)
fn echelonize_traced( pivots: &Reducers<Self>, rows: &[SparseRow<Self>], ncols: usize, ) -> (Vec<SparseRow<Self>>, Vec<usize>)
Echelon form and indices of independent input rows, used when learning a trace.
Source§fn echelonize(
pivots: &Reducers<Self>,
rows: &[SparseRow<Self>],
ncols: usize,
) -> Vec<SparseRow<Self>>
fn echelonize( pivots: &Reducers<Self>, rows: &[SparseRow<Self>], ncols: usize, ) -> Vec<SparseRow<Self>>
Reduce
rows modulo the monic pivots (distinct leading columns), then echelonize and
interreduce the remainders, returning the nonzero monic rows.Source§fn reduce_rows(
pivots: &Reducers<Self>,
rows: &[SparseRow<Self>],
ncols: usize,
) -> Vec<SparseRow<Self>>
fn reduce_rows( pivots: &Reducers<Self>, rows: &[SparseRow<Self>], ncols: usize, ) -> Vec<SparseRow<Self>>
Fully reduce each row modulo the monic
pivots (distinct leading columns).Source§fn modular(
_polynomials: &[Polynomial<Self>],
_canonicalize: bool,
) -> Option<Result<Vec<Polynomial<Self>>, GroebnerError>>
fn modular( _polynomials: &[Polynomial<Self>], _canonicalize: bool, ) -> Option<Result<Vec<Polynomial<Self>>, GroebnerError>>
Optional multi-modular backend. Return
None to use direct F4.Source§impl<const P: u64> FromStr for Gf<P>
Reduces as it reads, so any number of digits is accepted.
impl<const P: u64> FromStr for Gf<P>
Reduces as it reads, so any number of digits is accepted.
Source§impl<const P: u64> Modular for Gf<P>
impl<const P: u64> Modular for Gf<P>
Source§impl<const P: u64> Ord for Gf<P>
impl<const P: u64> Ord for Gf<P>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<const P: u64> ParseCoefficient for PrimeField<P>
impl<const P: u64> ParseCoefficient for PrimeField<P>
fn parse_coefficient( numerator: &str, denominator: Option<&str>, _modulus: Option<u64>, ) -> Result<Self, ParsePolynomialError>
Source§fn parameter_power(_exponent: u32) -> Option<Self>
fn parameter_power(_exponent: u32) -> Option<Self>
The ring parameter raised to
exponent, for fields with a parameter.Source§fn parameter(index: usize, count: usize) -> Option<Self>
fn parameter(index: usize, count: usize) -> Option<Self>
Parameter
index of count, for fields with parameters. The default is
Self::parameter_power for a single parameter.Source§fn format_coefficient_in(&self, parameters: &[String]) -> String
fn format_coefficient_in(&self, parameters: &[String]) -> String
Text for this coefficient as a factor of a term, with the parameters named
parameters.Source§fn format_coefficient_latex_in(&self, parameters: &[String]) -> String
fn format_coefficient_latex_in(&self, parameters: &[String]) -> String
LaTeX for this coefficient, with the parameters already in LaTeX.
Source§fn format_coefficient(&self, _parameter: &str) -> String
fn format_coefficient(&self, _parameter: &str) -> String
Text for this coefficient as a factor of a term, with the parameter named
parameter.fn format_coefficient_latex(&self, parameter: &str) -> String
fn minus_one() -> Self
fn bind_modulus(self, _modulus: Option<u64>) -> Self
Source§impl<const P: u64> PartialOrd for Gf<P>
impl<const P: u64> PartialOrd for Gf<P>
impl<const P: u64> StructuralPartialEq for Gf<P>
Auto Trait Implementations§
impl<const P: u64> Freeze for Gf<P>
impl<const P: u64> RefUnwindSafe for Gf<P>
impl<const P: u64> Send for Gf<P>
impl<const P: u64> Sync for Gf<P>
impl<const P: u64> Unpin for Gf<P>
impl<const P: u64> UnsafeUnpin for Gf<P>
impl<const P: u64> UnwindSafe for Gf<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more