pub trait ModSquareTruncatedAssign<M = Self> {
// Required method
fn mod_square_truncated_assign(&mut self, len: u64, m: M);
}Expand description
Squares a polynomial modulo $m$ in place, keeping only the coefficients of $x^i$ for $i$ less than a given length. The coefficients must already be reduced modulo $m$.
With $n$ equal to len, this is squaring in the ring of polynomials with coefficients modulo
$m$, taken modulo $x^n$, applied to the image of the polynomial there. Unlike the coefficients,
which must already be reduced, the polynomial need not already be truncated: it may have any
number of coefficients, and only the first len are read.
Required Methods§
Sourcefn mod_square_truncated_assign(&mut self, len: u64, m: M)
fn mod_square_truncated_assign(&mut self, len: u64, m: M)
Squares self modulo $m$ and truncates the square to its first len coefficients.
$$ p \gets (p^2 \bmod x^n) \bmod m. $$
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".