Enum Mersenne61

Source
pub enum Mersenne61 {}

Implementations§

Source§

impl Mersenne61

Source

pub const MOD: u64 = 2_305_843_009_213_693_951u64

Trait Implementations§

Source§

impl Magma for Mersenne61

Source§

type T = u64

type of operands: $T$
Source§

fn operate(x: &Self::T, y: &Self::T) -> Self::T

binary operaion: $\circ$
Source§

fn reverse_operate(x: &Self::T, y: &Self::T) -> Self::T

Source§

fn operate_assign(x: &mut Self::T, y: &Self::T)

Source§

impl SemiRing for Mersenne61

Source§

type T = u64

Source§

type Additive = Mersenne61Add

Source§

type Multiplicative = Mersenne61

Source§

fn zero() -> Self::T

additive identity: $0$
Source§

fn one() -> Self::T

multiplicative identity: $1$
Source§

fn add(x: &Self::T, y: &Self::T) -> Self::T

additive operaion: $+$
Source§

fn mul(x: &Self::T, y: &Self::T) -> Self::T

multiplicative operaion: $+$
Source§

fn add_assign(x: &mut Self::T, y: &Self::T)

Source§

fn mul_assign(x: &mut Self::T, y: &Self::T)

Source§

impl Unital for Mersenne61

Source§

fn unit() -> Self::T

identity element: $e$
Source§

fn is_unit(x: &Self::T) -> bool
where <Self as Magma>::T: PartialEq,

Source§

fn set_unit(x: &mut Self::T)

Source§

impl Associative for Mersenne61

Source§

impl Commutative for Mersenne61

Auto Trait Implementations§

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> 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<M> Monoid for M
where M: SemiGroup + Unital,

Source§

fn pow<E>(x: Self::T, exp: E) -> Self::T
where E: ExpBits,

binary exponentiation: $x^n = x\circ\ddots\circ x$
Source§

fn fold<I>(iter: I) -> Self::T
where I: IntoIterator<Item = Self::T>,

Source§

impl<R> Ring for R
where R: SemiRing, <R as SemiRing>::Additive: Invertible,

Source§

fn neg(x: &Self::T) -> Self::T

additive inverse: $-$
Source§

fn sub(x: &Self::T, y: &Self::T) -> Self::T

additive right inversed operaion: $-$
Source§

fn sub_assign(x: &mut Self::T, y: &Self::T)

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.
Source§

impl<M> AbelianMonoid for M
where M: Monoid + Commutative,

Source§

impl<S> SemiGroup for S
where S: Magma + Associative,