Skip to main content

DenomSparseU16

Struct DenomSparseU16 

Source
pub struct DenomSparseU16<const NUM_PRIMES: usize, const NUM_INLINE: usize> { /* private fields */ }
Expand description

Denominator representation that decomposes an integer as a product of the first NUM_PRIMES primes (up to 2^16), multiplied by a regular big integer when that’s not sufficient.

Trait Implementations§

Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Clone for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn clone(&self) -> DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Debug for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Denom for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

const ONE: Self

Constant value of 1.
Source§

fn into_biguint(self) -> BigUint

Converts this denominator into a big integer.
Source§

fn to_biguint(&self) -> BigUint

Converts this denominator into a big integer.
Source§

fn normalize( lnum: &mut BigInt, rnum: &mut BigInt, ldenom: &Self, rdenom: &Self, ) -> Self

Returns the least common multiple of two denominators, adjusting the numerators accordingly.
Source§

fn gcd_reduce(&mut self, num: &mut BigInt)

Reduces this denominator together with the given numerator so that their GCD is one.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> DenomRef<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Div for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn div(self, rhs: Self) -> Self

Divides this denominator by the other one.

This function panics if the other one doesn’t divide this one.

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the / operator.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Div for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn div(self, rhs: Self) -> DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Divides this denominator by the other one.

This function panics if the other one doesn’t divide this one.

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the / operator.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Div<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn div(self, rhs: &Self) -> Self

Divides this denominator by the other one.

This function panics if the other one doesn’t divide this one.

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the / operator.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Div<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn div( self, rhs: DenomSparseU16<NUM_PRIMES, NUM_INLINE>, ) -> DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Divides this denominator by the other one.

This function panics if the other one doesn’t divide this one.

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the / operator.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> DivAssign for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn div_assign(&mut self, rhs: Self)

Divides this denominator by the other one.

This function panics if the other one doesn’t divide this one.

Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> DivAssign<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn div_assign(&mut self, rhs: &Self)

Divides this denominator by the other one.

This function panics if the other one doesn’t divide this one.

Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Eq for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<&BigUint> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: &BigUint) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for BigUint

Source§

fn from(value: &DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> BigUint

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<BigUint> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: BigUint) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for BigUint

Source§

fn from(value: DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> BigUint

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<u8> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<u16> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<u32> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<u64> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<u128> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: u128) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> From<usize> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn from(value: usize) -> Self

Converts to this type from the input type.
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<&BigInt> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigInt) -> BigInt

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<&BigInt> for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigInt) -> BigInt

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Self) -> Self

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> Self

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> BigInt

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<BigInt> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigInt) -> BigInt

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<BigInt> for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigInt) -> BigInt

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The resulting type after applying the * operator.
Source§

fn mul( self, rhs: DenomSparseU16<NUM_PRIMES, NUM_INLINE>, ) -> DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> Self

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Mul<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> BigInt

Performs the * operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> MulAssign for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> MulAssign<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> MulAssign<&DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for BigInt

Source§

fn mul_assign(&mut self, rhs: &DenomSparseU16<NUM_PRIMES, NUM_INLINE>)

Performs the *= operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> MulAssign<DenomSparseU16<NUM_PRIMES, NUM_INLINE>> for BigInt

Source§

fn mul_assign(&mut self, rhs: DenomSparseU16<NUM_PRIMES, NUM_INLINE>)

Performs the *= operation. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> One for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> PartialEq for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

fn eq(&self, other: &DenomSparseU16<NUM_PRIMES, NUM_INLINE>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Pow<u32> for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The result after applying the operator.
Source§

fn pow(self, rhs: u32) -> Self

Returns self to the power rhs. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Pow<u32> for &DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Source§

type Output = DenomSparseU16<NUM_PRIMES, NUM_INLINE>

The result after applying the operator.
Source§

fn pow(self, rhs: u32) -> DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Returns self to the power rhs. Read more
Source§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> StructuralPartialEq for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

Auto Trait Implementations§

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Freeze for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> RefUnwindSafe for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Send for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Sync for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> Unpin for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> UnsafeUnpin for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

§

impl<const NUM_PRIMES: usize, const NUM_INLINE: usize> UnwindSafe for DenomSparseU16<NUM_PRIMES, NUM_INLINE>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

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, 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.