Trait comlib_math::Modulus[][src]

pub trait Modulus: Copy {
    type Base: Copy + Display + Debug + Add<Output = Self::Base> + Sub<Output = Self::Base> + Mul<Output = Self::Base> + Div<Output = Self::Base> + Rem<Output = Self::Base> + AddAssign + SubAssign + MulAssign + DivAssign + RemAssign + Eq + Ord + Default + From<u8>;
    fn modulus(self) -> Self::Base;
}
Expand description

Modulus contains the modulus and the actual storage type of ModInt.

Associated Types

Type for holding values mod modulus().

Must be large enough to contain the square of modulus() - 1, that is the maximum value which can be encountered during multiplication.

Required methods

Modulus in which computations should be done.

Implementors