pub trait ModPowerOf2ElementSum {
type Output;
// Required methods
fn to_mod_power_of_2_element_sum(&self, pow: u64) -> Self::Output;
fn into_mod_power_of_2_element_sum(self, pow: u64) -> Self::Output;
}Expand description
Calculates the sum of the elements of a vector modulo $2^k$.
The elements must already be reduced modulo $2^k$. Unlike ModPowerOf2Sum, which adds vectors
to each other, this adds up the elements of one vector, producing a single element.
Required Associated Types§
Required Methods§
fn to_mod_power_of_2_element_sum(&self, pow: u64) -> Self::Output
fn into_mod_power_of_2_element_sum(self, pow: u64) -> Self::Output
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".