Trait nekolib::math::ModIntBase

source ·
pub trait ModIntBase: Copy + Eq + Hash + Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Div<Output = Self> + Neg + AddAssign + SubAssign + MulAssign + DivAssign {
    // Required methods
    fn modulus() -> u32;
    fn get(self) -> u32;
    unsafe fn new_unchecked(n: u32) -> Self;

    // Provided methods
    fn new(n: impl RemEuclidU32) -> Self { ... }
    fn recip(self) -> Self { ... }
    fn checked_recip(self) -> Option<Self> { ... }
    fn pow(self, iexp: u64) -> Self { ... }
}

Required Methods§

source

fn modulus() -> u32

source

fn get(self) -> u32

source

unsafe fn new_unchecked(n: u32) -> Self

Provided Methods§

source

fn new(n: impl RemEuclidU32) -> Self

source

fn recip(self) -> Self

source

fn checked_recip(self) -> Option<Self>

source

fn pow(self, iexp: u64) -> Self

Implementors§