[−][src]Struct prcn_lib::modint::ModInt
Implementations
impl ModInt
[src]
pub const MOD: u64
[src]
ここの値、任意にするべきか
pub fn new(n: u64) -> ModInt
[src]
コンストラクタ
pub fn update(&mut self)
[src]
内部の値を一意に矯正する
impl ModInt
[src]
pub fn pow(self, n: u64) -> Self
[src]
二分累乗法,
O(log n)
で累乗を求める
pub fn inv(a: u64) -> Self
[src]
pub fn factorial(self) -> Self
[src]
Trait Implementations
impl Add<ModInt> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Add<i16> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: i16) -> Self::Output
[src]
impl Add<i32> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: i32) -> Self::Output
[src]
impl Add<i64> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: i64) -> Self::Output
[src]
impl Add<i8> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: i8) -> Self::Output
[src]
impl Add<isize> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: isize) -> Self::Output
[src]
impl Add<u16> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u16) -> Self::Output
[src]
impl Add<u32> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> Self::Output
[src]
impl Add<u64> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Self::Output
[src]
impl Add<u8> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u8) -> Self::Output
[src]
impl Add<usize> for ModInt
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: usize) -> Self::Output
[src]
impl AddAssign<ModInt> for ModInt
[src]
fn add_assign(&mut self, other: Self)
[src]
impl Clone for ModInt
[src]
impl Copy for ModInt
[src]
impl Debug for ModInt
[src]
impl Display for ModInt
[src]
impl Div<ModInt> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl Div<i16> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: i16) -> Self::Output
[src]
impl Div<i32> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> Self::Output
[src]
impl Div<i64> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: i64) -> Self::Output
[src]
impl Div<i8> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: i8) -> Self::Output
[src]
impl Div<isize> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: isize) -> Self::Output
[src]
impl Div<u16> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u16) -> Self::Output
[src]
impl Div<u32> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Self::Output
[src]
impl Div<u64> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u64) -> Self::Output
[src]
impl Div<u8> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u8) -> Self::Output
[src]
impl Div<usize> for ModInt
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: usize) -> Self::Output
[src]
impl DivAssign<ModInt> for ModInt
[src]
fn div_assign(&mut self, other: Self)
[src]
impl Mul<ModInt> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl Mul<i16> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: i16) -> Self::Output
[src]
impl Mul<i32> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> Self::Output
[src]
impl Mul<i64> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: i64) -> Self::Output
[src]
impl Mul<i8> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: i8) -> Self::Output
[src]
impl Mul<isize> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: isize) -> Self::Output
[src]
impl Mul<u16> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u16) -> Self::Output
[src]
impl Mul<u32> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self::Output
[src]
impl Mul<u64> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Self::Output
[src]
impl Mul<u8> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> Self::Output
[src]
impl Mul<usize> for ModInt
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: usize) -> Self::Output
[src]
impl MulAssign<ModInt> for ModInt
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl PartialEq<ModInt> for ModInt
[src]
impl PartialOrd<ModInt> for ModInt
[src]
fn partial_cmp(&self, other: &ModInt) -> Option<Ordering>
[src]
fn lt(&self, other: &ModInt) -> bool
[src]
fn le(&self, other: &ModInt) -> bool
[src]
fn gt(&self, other: &ModInt) -> bool
[src]
fn ge(&self, other: &ModInt) -> bool
[src]
impl StructuralPartialEq for ModInt
[src]
impl Sub<ModInt> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl Sub<i16> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: i16) -> Self::Output
[src]
impl Sub<i32> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: i32) -> Self::Output
[src]
impl Sub<i64> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: i64) -> Self::Output
[src]
impl Sub<i8> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: i8) -> Self::Output
[src]
impl Sub<isize> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: isize) -> Self::Output
[src]
impl Sub<u16> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: u16) -> Self::Output
[src]
impl Sub<u32> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: u32) -> Self::Output
[src]
impl Sub<u64> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: u64) -> Self::Output
[src]
impl Sub<u8> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: u8) -> Self::Output
[src]
impl Sub<usize> for ModInt
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: usize) -> Self::Output
[src]
impl SubAssign<ModInt> for ModInt
[src]
fn sub_assign(&mut self, other: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ModInt
impl Send for ModInt
impl Sync for ModInt
impl Unpin for ModInt
impl UnwindSafe for ModInt
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, Right> ClosedAdd<Right> for T where
T: Add<Right, Output = T> + AddAssign<Right>,
[src]
T: Add<Right, Output = T> + AddAssign<Right>,
impl<T, Right> ClosedDiv<Right> for T where
T: Div<Right, Output = T> + DivAssign<Right>,
[src]
T: Div<Right, Output = T> + DivAssign<Right>,
impl<T, Right> ClosedMul<Right> for T where
T: Mul<Right, Output = T> + MulAssign<Right>,
[src]
T: Mul<Right, Output = T> + MulAssign<Right>,
impl<T, Right> ClosedSub<Right> for T where
T: Sub<Right, Output = T> + SubAssign<Right>,
[src]
T: Sub<Right, Output = T> + SubAssign<Right>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,