pub struct Modint {
pub MOD: usize,
pub fact: usize,
}
Fields§
§MOD: usize
どの値でmod を取るかの情報が入っています。
fact: usize
ここにModintの実体が入っています。結果を取り出すときはこの値を取り出すことになります
Implementations§
Trait Implementations§
source§impl AddAssign<Modint> for Modint
impl AddAssign<Modint> for Modint
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl MulAssign<Modint> for Modint
impl MulAssign<Modint> for Modint
source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moresource§impl PartialEq<Modint> for Modint
impl PartialEq<Modint> for Modint
source§impl SubAssign<Modint> for Modint
impl SubAssign<Modint> for Modint
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for Modint
impl Eq for Modint
impl StructuralEq for Modint
impl StructuralPartialEq for Modint
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more