Skip to main content

StaticModInt

Struct StaticModInt 

Source
pub struct StaticModInt<M> { /* private fields */ }

Trait Implementations§

Source§

impl<'a, M: NttFriendly> Add<&'a StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the + operation. Read more
Source§

impl<M: Modulus> Add<&StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the + operation. Read more
Source§

impl<'a, M: NttFriendly> Add<&'a StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the + operation. Read more
Source§

impl<M: Modulus> Add<&StaticModInt<M>> for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the + operation. Read more
Source§

impl<'a, M: NttFriendly> Add<StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the + operator.
Source§

fn add(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the + operation. Read more
Source§

impl<M: Modulus> Add<StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the + operation. Read more
Source§

impl<M: NttFriendly> Add<StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the + operator.
Source§

fn add(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the + operation. Read more
Source§

impl<M: Modulus> Add for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the + operation. Read more
Source§

impl<'a, M: NttFriendly> AddAssign<&'a StaticModInt<M>> for Polynomial<M>

Source§

fn add_assign(&mut self, other: &'a StaticModInt<M>)

Performs the += operation. Read more
Source§

impl<M: Modulus> AddAssign<&StaticModInt<M>> for StaticModInt<M>

Source§

fn add_assign(&mut self, rhs: &StaticModInt<M>)

Performs the += operation. Read more
Source§

impl<M: NttFriendly> AddAssign<StaticModInt<M>> for Polynomial<M>

Source§

fn add_assign(&mut self, other: StaticModInt<M>)

Performs the += operation. Read more
Source§

impl<M: Modulus> AddAssign for StaticModInt<M>

Source§

fn add_assign(&mut self, rhs: StaticModInt<M>)

Performs the += operation. Read more
Source§

impl<'a, M: NttFriendly> BitAnd<&'a StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the & operation. Read more
Source§

impl<'a, M: NttFriendly> BitAnd<&'a StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the & operation. Read more
Source§

impl<'a, M: NttFriendly> BitAnd<StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the & operation. Read more
Source§

impl<M: NttFriendly> BitAnd<StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the & operation. Read more
Source§

impl<'a, M: NttFriendly> BitAndAssign<&'a StaticModInt<M>> for Polynomial<M>

Source§

fn bitand_assign(&mut self, other: &'a StaticModInt<M>)

Performs the &= operation. Read more
Source§

impl<M: NttFriendly> BitAndAssign<StaticModInt<M>> for Polynomial<M>

Source§

fn bitand_assign(&mut self, other: StaticModInt<M>)

Performs the &= operation. Read more
Source§

impl<M: Clone> Clone for StaticModInt<M>

Source§

fn clone(&self) -> StaticModInt<M>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M: Modulus> Debug for StaticModInt<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: Modulus> Default for StaticModInt<M>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<M: Modulus> Display for StaticModInt<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, M: NttFriendly> Div<&'a StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the / operation. Read more
Source§

impl<M: Modulus> Div<&StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the / operation. Read more
Source§

impl<'a, M: NttFriendly> Div<&'a StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the / operation. Read more
Source§

impl<M: Modulus> Div<&StaticModInt<M>> for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the / operation. Read more
Source§

impl<'a, M: NttFriendly> Div<StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the / operator.
Source§

fn div(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the / operation. Read more
Source§

impl<M: Modulus> Div<StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the / operation. Read more
Source§

impl<M: NttFriendly> Div<StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the / operator.
Source§

fn div(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the / operation. Read more
Source§

impl<M: Modulus> Div for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the / operation. Read more
Source§

impl<'a, M: NttFriendly> DivAssign<&'a StaticModInt<M>> for Polynomial<M>

Source§

fn div_assign(&mut self, other: &'a StaticModInt<M>)

Performs the /= operation. Read more
Source§

impl<M: Modulus> DivAssign<&StaticModInt<M>> for StaticModInt<M>

Source§

fn div_assign(&mut self, rhs: &StaticModInt<M>)

Performs the /= operation. Read more
Source§

impl<M: NttFriendly> DivAssign<StaticModInt<M>> for Polynomial<M>

Source§

fn div_assign(&mut self, other: StaticModInt<M>)

Performs the /= operation. Read more
Source§

impl<M: Modulus> DivAssign for StaticModInt<M>

Source§

fn div_assign(&mut self, rhs: StaticModInt<M>)

Performs the /= operation. Read more
Source§

impl<I: RemEuclidU32, M: Modulus> From<I> for StaticModInt<M>

Source§

fn from(x: I) -> Self

Converts to this type from the input type.
Source§

impl<M: Modulus> Hash for StaticModInt<M>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<M: Modulus> ModIntBase for StaticModInt<M>

Source§

fn modulus() -> u32

Source§

fn get(self) -> u32

Source§

unsafe fn new_unchecked(val: u32) -> Self

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

Source§

impl<'a, M: NttFriendly> Mul<&'a StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the * operation. Read more
Source§

impl<M: Modulus> Mul<&StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the * operation. Read more
Source§

impl<'a, M: NttFriendly> Mul<&'a StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the * operation. Read more
Source§

impl<M: Modulus> Mul<&StaticModInt<M>> for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the * operation. Read more
Source§

impl<'a, M: NttFriendly> Mul<StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the * operation. Read more
Source§

impl<M: Modulus> Mul<StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the * operation. Read more
Source§

impl<M: NttFriendly> Mul<StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the * operation. Read more
Source§

impl<M: Modulus> Mul for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the * operation. Read more
Source§

impl<'a, M: NttFriendly> MulAssign<&'a StaticModInt<M>> for Polynomial<M>

Source§

fn mul_assign(&mut self, other: &'a StaticModInt<M>)

Performs the *= operation. Read more
Source§

impl<M: Modulus> MulAssign<&StaticModInt<M>> for StaticModInt<M>

Source§

fn mul_assign(&mut self, rhs: &StaticModInt<M>)

Performs the *= operation. Read more
Source§

impl<M: NttFriendly> MulAssign<StaticModInt<M>> for Polynomial<M>

Source§

fn mul_assign(&mut self, other: StaticModInt<M>)

Performs the *= operation. Read more
Source§

impl<M: Modulus> MulAssign for StaticModInt<M>

Source§

fn mul_assign(&mut self, rhs: StaticModInt<M>)

Performs the *= operation. Read more
Source§

impl<M: Modulus> Neg for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<M: PartialEq> PartialEq for StaticModInt<M>

Source§

fn eq(&self, other: &StaticModInt<M>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, M: Modulus> Product<&'a StaticModInt<M>> for StaticModInt<M>

Source§

fn product<S>(iter: S) -> Self
where S: Iterator<Item = &'a Self>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<M: Modulus> Product for StaticModInt<M>

Source§

fn product<S>(iter: S) -> Self
where S: Iterator<Item = Self>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<'a, M: NttFriendly> Rem<&'a StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the % operator.
Source§

fn rem(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the % operation. Read more
Source§

impl<'a, M: NttFriendly> Rem<&'a StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the % operator.
Source§

fn rem(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the % operation. Read more
Source§

impl<'a, M: NttFriendly> Rem<StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the % operator.
Source§

fn rem(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the % operation. Read more
Source§

impl<M: NttFriendly> Rem<StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the % operator.
Source§

fn rem(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the % operation. Read more
Source§

impl<'a, M: NttFriendly> RemAssign<&'a StaticModInt<M>> for Polynomial<M>

Source§

fn rem_assign(&mut self, other: &'a StaticModInt<M>)

Performs the %= operation. Read more
Source§

impl<M: NttFriendly> RemAssign<StaticModInt<M>> for Polynomial<M>

Source§

fn rem_assign(&mut self, other: StaticModInt<M>)

Performs the %= operation. Read more
Source§

impl<'a, M: NttFriendly> Sub<&'a StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the - operation. Read more
Source§

impl<M: Modulus> Sub<&StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the - operation. Read more
Source§

impl<'a, M: NttFriendly> Sub<&'a StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a StaticModInt<M>) -> Polynomial<M>

Performs the - operation. Read more
Source§

impl<M: Modulus> Sub<&StaticModInt<M>> for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &StaticModInt<M>) -> StaticModInt<M>

Performs the - operation. Read more
Source§

impl<'a, M: NttFriendly> Sub<StaticModInt<M>> for &'a Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the - operator.
Source§

fn sub(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the - operation. Read more
Source§

impl<M: Modulus> Sub<StaticModInt<M>> for &StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the - operation. Read more
Source§

impl<M: NttFriendly> Sub<StaticModInt<M>> for Polynomial<M>

Source§

type Output = Polynomial<M>

The resulting type after applying the - operator.
Source§

fn sub(self, other: StaticModInt<M>) -> Polynomial<M>

Performs the - operation. Read more
Source§

impl<M: Modulus> Sub for StaticModInt<M>

Source§

type Output = StaticModInt<M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: StaticModInt<M>) -> StaticModInt<M>

Performs the - operation. Read more
Source§

impl<'a, M: NttFriendly> SubAssign<&'a StaticModInt<M>> for Polynomial<M>

Source§

fn sub_assign(&mut self, other: &'a StaticModInt<M>)

Performs the -= operation. Read more
Source§

impl<M: Modulus> SubAssign<&StaticModInt<M>> for StaticModInt<M>

Source§

fn sub_assign(&mut self, rhs: &StaticModInt<M>)

Performs the -= operation. Read more
Source§

impl<M: NttFriendly> SubAssign<StaticModInt<M>> for Polynomial<M>

Source§

fn sub_assign(&mut self, other: StaticModInt<M>)

Performs the -= operation. Read more
Source§

impl<M: Modulus> SubAssign for StaticModInt<M>

Source§

fn sub_assign(&mut self, rhs: StaticModInt<M>)

Performs the -= operation. Read more
Source§

impl<'a, M: Modulus> Sum<&'a StaticModInt<M>> for StaticModInt<M>

Source§

fn sum<S>(iter: S) -> Self
where S: Iterator<Item = &'a Self>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<M: Modulus> Sum for StaticModInt<M>

Source§

fn sum<S>(iter: S) -> Self
where S: Iterator<Item = Self>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<M: Copy> Copy for StaticModInt<M>

Source§

impl<M: Eq> Eq for StaticModInt<M>

Source§

impl<M> StructuralPartialEq for StaticModInt<M>

Auto Trait Implementations§

§

impl<M> Freeze for StaticModInt<M>

§

impl<M> RefUnwindSafe for StaticModInt<M>

§

impl<M> Send for StaticModInt<M>

§

impl<M> Sync for StaticModInt<M>

§

impl<M> Unpin for StaticModInt<M>

§

impl<M> UnsafeUnpin for StaticModInt<M>

§

impl<M> UnwindSafe for StaticModInt<M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V