Skip to main content

Lcm

Trait Lcm 

Source
pub trait Lcm<Rhs = Self>: Sized {
    type Output;

    // Required methods
    fn lcm(&self, rhs: &Rhs) -> Self::Output;
    fn lcm_vartime(&self, rhs: &Rhs) -> Self::Output;
}
Expand description

Compute the least common multiple of two integers.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn lcm(&self, rhs: &Rhs) -> Self::Output

Compute the least common multiple of self and rhs.

Source

fn lcm_vartime(&self, rhs: &Rhs) -> Self::Output

Compute the least common multiple of self and rhs in variable time.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Lcm for BoxedUint

Source§

impl<const LIMBS: usize, const WIDE_LIMBS: usize> Lcm for Uint<LIMBS>
where Self: Concat<LIMBS, Output = Uint<WIDE_LIMBS>>,

Source§

type Output = Uint<WIDE_LIMBS>