[][src]Struct prcn_lib::modint::ModInt

pub struct ModInt(pub u64);

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.

impl Add<i16> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<i32> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<i64> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<i8> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<isize> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u16> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u32> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u64> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u8> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<usize> for ModInt[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<ModInt> for ModInt[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.

impl Div<i16> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<i32> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<i64> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<i8> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<isize> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u16> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u32> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u64> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u8> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<usize> for ModInt[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<ModInt> for ModInt[src]

impl Mul<ModInt> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<i16> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<i32> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<i64> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<i8> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<isize> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u16> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u32> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u64> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u8> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<usize> for ModInt[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<ModInt> for ModInt[src]

impl PartialEq<ModInt> for ModInt[src]

impl PartialOrd<ModInt> for ModInt[src]

impl StructuralPartialEq for ModInt[src]

impl Sub<ModInt> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<i16> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<i32> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<i64> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<i8> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<isize> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<u16> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<u32> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<u64> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<u8> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<usize> for ModInt[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<ModInt> for ModInt[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]

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

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

impl<T, Right> ClosedAdd<Right> for T where
    T: Add<Right, Output = T> + AddAssign<Right>, 
[src]

impl<T, Right> ClosedDiv<Right> for T where
    T: Div<Right, Output = T> + DivAssign<Right>, 
[src]

impl<T, Right> ClosedMul<Right> for T where
    T: Mul<Right, Output = T> + MulAssign<Right>, 
[src]

impl<T, Right> ClosedSub<Right> for T where
    T: Sub<Right, Output = T> + SubAssign<Right>, 
[src]

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

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

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]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,