Struct nekolib::math::StaticModInt

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

Trait Implementations§

source§

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

§

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<'a, M: NttFriendly> Add<&'a StaticModInt<M>> for Polynomial<M>

§

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>

§

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: Modulus> Add<&StaticModInt<M>> for StaticModInt<M>

§

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>

§

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>

§

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>

§

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>

§

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<StaticModInt<M>> 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>

§

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>

§

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>

§

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>

§

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 copy 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>

§

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<'a, M: NttFriendly> Div<&'a StaticModInt<M>> for Polynomial<M>

§

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>

§

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: Modulus> Div<&StaticModInt<M>> for StaticModInt<M>

§

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>

§

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>

§

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>

§

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>

§

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<StaticModInt<M>> 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>

§

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<'a, M: NttFriendly> Mul<&'a StaticModInt<M>> for Polynomial<M>

§

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>

§

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: Modulus> Mul<&StaticModInt<M>> for StaticModInt<M>

§

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>

§

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>

§

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>

§

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>

§

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<StaticModInt<M>> 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>

§

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<StaticModInt<M>> for StaticModInt<M>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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) -> Selfwhere S: Iterator<Item = &'a Self>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

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

source§

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

Method which 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>

§

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>

§

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>

§

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>

§

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>

§

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<'a, M: NttFriendly> Sub<&'a StaticModInt<M>> for Polynomial<M>

§

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>

§

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: Modulus> Sub<&StaticModInt<M>> for StaticModInt<M>

§

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>

§

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>

§

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>

§

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>

§

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<StaticModInt<M>> 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) -> Selfwhere S: Iterator<Item = &'a Self>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

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

source§

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

Method which 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> StructuralEq for StaticModInt<M>

source§

impl<M> StructuralPartialEq for StaticModInt<M>

Auto Trait Implementations§

§

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> UnwindSafe for StaticModInt<M>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

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

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

§

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 Twhere U: TryFrom<T>,

§

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 Twhere V: MultiLane<T>,

§

fn vzip(self) -> V