Skip to main content

ModMakeMonic

Trait ModMakeMonic 

Source
pub trait ModMakeMonic<M> {
    type Output;
    type Factor;

    // Required method
    fn mod_make_monic(self, m: M) -> Result<Self::Output, Self::Factor>;
}
Expand description

Makes a polynomial monic modulo $m$, by multiplying it by the inverse of its leading coefficient.

The polynomial’s coefficients must already be reduced modulo $m$. If the leading coefficient is not invertible modulo $m$, its greatest common divisor with $m$, a nontrivial factor of $m$, is returned as the error. The zero polynomial is left as it is.

Required Associated Types§

Source

type Output

The type of the monic polynomial.

Source

type Factor

The type of the factor of $m$ returned when the leading coefficient is not invertible.

Required Methods§

Source

fn mod_make_monic(self, m: M) -> Result<Self::Output, Self::Factor>

Makes a polynomial monic modulo m.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§