Skip to main content

ModElementProduct

Trait ModElementProduct 

Source
pub trait ModElementProduct<M> {
    type Output;

    // Required methods
    fn to_mod_element_product(&self, m: M) -> Self::Output;
    fn into_mod_element_product(self, m: M) -> Self::Output;
}
Expand description

Calculates the product of the elements of a vector modulo another number $m$.

The elements must already be reduced modulo $m$. Unlike ModProduct, which multiplies values from an iterator, this multiplies the elements of one vector, producing a single element.

Required Associated Types§

Required Methods§

Source

fn to_mod_element_product(&self, m: M) -> Self::Output

Source

fn into_mod_element_product(self, m: M) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§