pub trait ModAbsSquaredAssign<M = Self> {
// Required method
fn mod_abs_squared_assign(&mut self, m: M);
}Expand description
Replaces a number with its squared absolute value modulo another number $m$. The input must be already reduced modulo $m$.
Required Methods§
fn mod_abs_squared_assign(&mut self, m: M)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ModAbsSquaredAssign for u8
impl ModAbsSquaredAssign for u8
Source§fn mod_abs_squared_assign(&mut self, m: u8)
fn mod_abs_squared_assign(&mut self, m: u8)
Replaces a number with its squared absolute value modulo another number $m$, which for an unsigned number is its square modulo $m$. The input must be already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $|x|^2 = x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self is greater than or equal to m.
§Examples
See here.
Source§impl ModAbsSquaredAssign for u16
impl ModAbsSquaredAssign for u16
Source§fn mod_abs_squared_assign(&mut self, m: u16)
fn mod_abs_squared_assign(&mut self, m: u16)
Replaces a number with its squared absolute value modulo another number $m$, which for an unsigned number is its square modulo $m$. The input must be already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $|x|^2 = x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self is greater than or equal to m.
§Examples
See here.
Source§impl ModAbsSquaredAssign for u32
impl ModAbsSquaredAssign for u32
Source§fn mod_abs_squared_assign(&mut self, m: u32)
fn mod_abs_squared_assign(&mut self, m: u32)
Replaces a number with its squared absolute value modulo another number $m$, which for an unsigned number is its square modulo $m$. The input must be already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $|x|^2 = x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self is greater than or equal to m.
§Examples
See here.
Source§impl ModAbsSquaredAssign for u64
impl ModAbsSquaredAssign for u64
Source§fn mod_abs_squared_assign(&mut self, m: u64)
fn mod_abs_squared_assign(&mut self, m: u64)
Replaces a number with its squared absolute value modulo another number $m$, which for an unsigned number is its square modulo $m$. The input must be already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $|x|^2 = x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self is greater than or equal to m.
§Examples
See here.
Source§impl ModAbsSquaredAssign for u128
impl ModAbsSquaredAssign for u128
Source§fn mod_abs_squared_assign(&mut self, m: u128)
fn mod_abs_squared_assign(&mut self, m: u128)
Replaces a number with its squared absolute value modulo another number $m$, which for an unsigned number is its square modulo $m$. The input must be already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $|x|^2 = x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self is greater than or equal to m.
§Examples
See here.
Source§impl ModAbsSquaredAssign for usize
impl ModAbsSquaredAssign for usize
Source§fn mod_abs_squared_assign(&mut self, m: usize)
fn mod_abs_squared_assign(&mut self, m: usize)
Replaces a number with its squared absolute value modulo another number $m$, which for an unsigned number is its square modulo $m$. The input must be already reduced modulo $m$.
$x \gets y$, where $x, y < m$ and $|x|^2 = x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self is greater than or equal to m.
§Examples
See here.