Skip to main content

ModPowerOf2ElementSum

Trait ModPowerOf2ElementSum 

Source
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§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§