[][src]Struct algebraics::mod_int::ModularInteger

pub struct ModularInteger<V, M> { /* fields omitted */ }

Methods

impl<V, M> ModularInteger<V, M>[src]

pub fn value(&self) -> &V[src]

pub fn modulus(&self) -> &M[src]

impl<V, M: PartialEq> ModularInteger<V, M>[src]

pub fn has_matching_moduli(&self, rhs: &Self) -> bool[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> ModularInteger<V, M>[src]

pub fn new(value: V, modulus: M) -> Self[src]

pub fn neg_assign(&mut self)[src]

*self = -*self

pub fn from_u8(value: u8, modulus: M) -> Self[src]

pub fn from_i8(value: i8, modulus: M) -> Self[src]

pub fn from_u16(value: u16, modulus: M) -> Self[src]

pub fn from_i16(value: i16, modulus: M) -> Self[src]

pub fn from_u32(value: u32, modulus: M) -> Self[src]

pub fn from_i32(value: i32, modulus: M) -> Self[src]

pub fn from_u64(value: u64, modulus: M) -> Self[src]

pub fn from_i64(value: i64, modulus: M) -> Self[src]

pub fn from_u128(value: u128, modulus: M) -> Self[src]

pub fn from_i128(value: i128, modulus: M) -> Self[src]

pub fn from_usize(value: usize, modulus: M) -> Self[src]

pub fn from_isize(value: isize, modulus: M) -> Self[src]

pub fn from_bigint(value: &BigInt, modulus: M) -> Self[src]

pub fn from_biguint(value: &BigUint, modulus: M) -> Self[src]

impl<V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> ModularInteger<V, M>[src]

pub fn checked_inverse(&self) -> Option<Self>[src]

pub fn inverse(&self) -> Self[src]

Trait Implementations

impl<V, M> PolynomialCoefficient for ModularInteger<V, M> where
    V: ModularReducePow<usize> + Eq + One + Zero + Debug + Hash,
    M: Modulus<V> + Debug + Hash
[src]

type Element = Self

type Divisor = DivisorIsOne

impl<V, M> PolynomialReducingFactorSupported for ModularInteger<V, M> where
    V: ModularReducePow<usize> + Integer + Debug + Hash,
    M: PrimeModulus<V> + Debug + Hash
[src]

impl<V, M> ExactDiv<ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD,
    M: Modulus<V>, 
[src]

type Output = ModularInteger<V, M>

impl<'r, V, M> ExactDiv<&'r ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD,
    M: Modulus<V>, 
[src]

type Output = ModularInteger<V, M>

impl<'l, V, M> ExactDiv<ModularInteger<V, M>> for &'l ModularInteger<V, M> where
    V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD,
    M: Modulus<V>, 
[src]

type Output = ModularInteger<V, M>

impl<'l, 'r, V, M> ExactDiv<&'r ModularInteger<V, M>> for &'l ModularInteger<V, M> where
    V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD,
    M: Modulus<V>, 
[src]

type Output = ModularInteger<V, M>

impl<V, M> ExactDivAssign<ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD,
    M: Modulus<V>, 
[src]

impl<'r, V, M> ExactDivAssign<&'r ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD,
    M: Modulus<V>, 
[src]

impl<V, M> AlwaysExactDiv<ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Integer + GCD<Output = V> + ExtendedGCD,
    M: PrimeModulus<V>, 
[src]

impl<'r, V, M> AlwaysExactDiv<&'r ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Integer + GCD<Output = V> + ExtendedGCD,
    M: PrimeModulus<V>, 
[src]

impl<'l, V, M> AlwaysExactDiv<ModularInteger<V, M>> for &'l ModularInteger<V, M> where
    V: ModularReduce + Integer + GCD<Output = V> + ExtendedGCD,
    M: PrimeModulus<V>, 
[src]

impl<'l, 'r, V, M> AlwaysExactDiv<&'r ModularInteger<V, M>> for &'l ModularInteger<V, M> where
    V: ModularReduce + Integer + GCD<Output = V> + ExtendedGCD,
    M: PrimeModulus<V>, 
[src]

impl<V, M> AlwaysExactDivAssign<ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Integer + GCD<Output = V> + ExtendedGCD,
    M: PrimeModulus<V>, 
[src]

impl<'r, V, M> AlwaysExactDivAssign<&'r ModularInteger<V, M>> for ModularInteger<V, M> where
    V: ModularReduce + Integer + GCD<Output = V> + ExtendedGCD,
    M: PrimeModulus<V>, 
[src]

impl<V, M> Into<(V, M)> for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> From<(V, M)> for ModularInteger<V, M>[src]

impl<V: Clone, M: Clone> Clone for ModularInteger<V, M>[src]

impl<V: Copy, M: Copy> Copy for ModularInteger<V, M>[src]

impl<V: Eq, M: Eq> Eq for ModularInteger<V, M>[src]

impl<V: PartialEq, M: PartialEq> PartialEq<ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<V: Display, M: Display> Display for ModularInteger<V, M>[src]

impl<V: Debug, M: Debug> Debug for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> Div<ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the / operator.

impl<'_, V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> Div<ModularInteger<V, M>> for &'_ ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the / operator.

impl<'_, V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> Div<&'_ ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the / operator.

impl<'a, 'b, V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> Div<&'a ModularInteger<V, M>> for &'b ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the / operator.

impl<V: ModularReduce + Eq, M: Modulus<V>> Sub<ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the - operator.

impl<'r, V: ModularReduce + Eq, M: Modulus<V>> Sub<&'r ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the - operator.

impl<'l, V: ModularReduce + Eq, M: Modulus<V>> Sub<ModularInteger<V, M>> for &'l ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the - operator.

impl<'l, 'r, V: ModularReduce + Eq, M: Modulus<V>> Sub<&'r ModularInteger<V, M>> for &'l ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the - operator.

impl<V: ModularReduce + Eq, M: Modulus<V>> Add<ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the + operator.

impl<'r, V: ModularReduce + Eq, M: Modulus<V>> Add<&'r ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the + operator.

impl<'l, V: ModularReduce + Eq, M: Modulus<V>> Add<ModularInteger<V, M>> for &'l ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the + operator.

impl<'l, 'r, V: ModularReduce + Eq, M: Modulus<V>> Add<&'r ModularInteger<V, M>> for &'l ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the + operator.

impl<V: ModularReduce + Eq, M: Modulus<V>> Mul<ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the * operator.

impl<'r, V: ModularReduce + Eq, M: Modulus<V>> Mul<&'r ModularInteger<V, M>> for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the * operator.

impl<'l, V: ModularReduce + Eq, M: Modulus<V>> Mul<ModularInteger<V, M>> for &'l ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the * operator.

impl<'l, 'r, V: ModularReduce + Eq, M: Modulus<V>> Mul<&'r ModularInteger<V, M>> for &'l ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the * operator.

impl<V: ModularReduce + Eq, M: Modulus<V>> Neg for ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the - operator.

impl<'a, V: ModularReduce + Eq, M: Modulus<V>> Neg for &'a ModularInteger<V, M>[src]

type Output = ModularInteger<V, M>

The resulting type after applying the - operator.

impl<V: ModularReduce + Eq, M: Modulus<V>> AddAssign<ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<'r, V: ModularReduce + Eq, M: Modulus<V>> AddAssign<&'r ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> SubAssign<ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<'r, V: ModularReduce + Eq, M: Modulus<V>> SubAssign<&'r ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> MulAssign<ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<'r, V: ModularReduce + Eq, M: Modulus<V>> MulAssign<&'r ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> DivAssign<ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<'_, V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> DivAssign<&'_ ModularInteger<V, M>> for ModularInteger<V, M>[src]

impl<V: Hash, M: Hash> Hash for ModularInteger<V, M>[src]

impl<V, M> StructuralPartialEq for ModularInteger<V, M>[src]

impl<V, M> StructuralEq for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> CheckedAdd for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq + One + Zero + GCD<Output = V> + ExtendedGCD, M: Modulus<V>> CheckedDiv for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> CheckedMul for ModularInteger<V, M>[src]

impl<V: ModularReduce + Eq, M: Modulus<V>> CheckedSub for ModularInteger<V, M>[src]

Auto Trait Implementations

impl<V, M> Send for ModularInteger<V, M> where
    M: Send,
    V: Send

impl<V, M> Sync for ModularInteger<V, M> where
    M: Sync,
    V: Sync

impl<V, M> Unpin for ModularInteger<V, M> where
    M: Unpin,
    V: Unpin

impl<V, M> UnwindSafe for ModularInteger<V, M> where
    M: UnwindSafe,
    V: UnwindSafe

impl<V, M> RefUnwindSafe for ModularInteger<V, M> where
    M: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

impl<T> PolynomialCoefficientElement for T where
    T: Neg<Output = T> + AddAssign<T> + AddAssign<&'a T> + SubAssign<T> + SubAssign<&'a T> + MulAssign<T> + MulAssign<&'a T> + PolynomialCoefficient<Divisor = DivisorIsOne, Output = T, Output = T, Output = T, Output = T, Output = T, Output = T> + Add<T> + Add<&'a T> + Sub<T> + Sub<&'a T> + Mul<T> + Mul<&'a T>, 
[src]

impl<T> PolynomialDivSupported for T where
    T: PolynomialCoefficient + AlwaysExactDivAssign<T> + AlwaysExactDivAssign<&'a T>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]