Skip to main content

ExponentGcd

Trait ExponentGcd 

Source
pub trait ExponentGcd {
    // Required method
    fn exponent_gcd(&self) -> u64;
}
Expand description

Computes the greatest common divisor of the exponents at which a polynomial has nonzero coefficients.

This is the largest $k$ such that $p(x) = q(x^k)$ for some polynomial $q$, when $p$ is not constant. A constant polynomial, including zero, gives 0: its only exponent with a nonzero coefficient, if any, is 0, and the GCD of $\{0\}$ and of the empty set are both 0.

Required Methods§

Source

fn exponent_gcd(&self) -> u64

Computes the greatest common divisor of the exponents at which a polynomial has nonzero coefficients.

$$ f(p) = \gcd \{i : p_i \neq 0\}. $$

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§