pub struct DenomArray<const NUM_PRIMES: usize> { /* private fields */ }Expand description
Denominator representation that decomposes an integer as a product of the
first NUM_PRIMES primes, multiplied by a regular big integer when that’s
not sufficient.
Trait Implementations§
Source§impl<const NUM_PRIMES: usize> Clone for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Clone for DenomArray<NUM_PRIMES>
Source§fn clone(&self) -> DenomArray<NUM_PRIMES>
fn clone(&self) -> DenomArray<NUM_PRIMES>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const NUM_PRIMES: usize> Debug for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Debug for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Denom for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Denom for DenomArray<NUM_PRIMES>
Source§fn into_biguint(self) -> BigUint
fn into_biguint(self) -> BigUint
Converts this denominator into a big integer.
Source§fn to_biguint(&self) -> BigUint
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
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)
fn gcd_reduce(&mut self, num: &mut BigInt)
Reduces this denominator together with the given numerator so that their
GCD is one.
impl<const NUM_PRIMES: usize> DenomRef<DenomArray<NUM_PRIMES>> for &DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Div for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Div for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Div for &DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Div for &DenomArray<NUM_PRIMES>
Source§fn div(self, rhs: Self) -> DenomArray<NUM_PRIMES>
fn div(self, rhs: Self) -> DenomArray<NUM_PRIMES>
Divides this denominator by the other one.
This function panics if the other one doesn’t divide this one.
Source§type Output = DenomArray<NUM_PRIMES>
type Output = DenomArray<NUM_PRIMES>
The resulting type after applying the
/ operator.Source§impl<const NUM_PRIMES: usize> Div<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Div<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Div<DenomArray<NUM_PRIMES>> for &DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Div<DenomArray<NUM_PRIMES>> for &DenomArray<NUM_PRIMES>
Source§fn div(self, rhs: DenomArray<NUM_PRIMES>) -> DenomArray<NUM_PRIMES>
fn div(self, rhs: DenomArray<NUM_PRIMES>) -> DenomArray<NUM_PRIMES>
Divides this denominator by the other one.
This function panics if the other one doesn’t divide this one.
Source§type Output = DenomArray<NUM_PRIMES>
type Output = DenomArray<NUM_PRIMES>
The resulting type after applying the
/ operator.Source§impl<const NUM_PRIMES: usize> DivAssign for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> DivAssign for DenomArray<NUM_PRIMES>
Source§fn div_assign(&mut self, rhs: Self)
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> DivAssign<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> DivAssign<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
Source§fn div_assign(&mut self, rhs: &Self)
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.
impl<const NUM_PRIMES: usize> Eq for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> From<&DenomArray<NUM_PRIMES>> for BigUint
impl<const NUM_PRIMES: usize> From<&DenomArray<NUM_PRIMES>> for BigUint
Source§fn from(value: &DenomArray<NUM_PRIMES>) -> BigUint
fn from(value: &DenomArray<NUM_PRIMES>) -> BigUint
Converts to this type from the input type.
Source§impl<const NUM_PRIMES: usize> From<DenomArray<NUM_PRIMES>> for BigUint
impl<const NUM_PRIMES: usize> From<DenomArray<NUM_PRIMES>> for BigUint
Source§fn from(value: DenomArray<NUM_PRIMES>) -> BigUint
fn from(value: DenomArray<NUM_PRIMES>) -> BigUint
Converts to this type from the input type.
Source§impl<const NUM_PRIMES: usize> Mul for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Mul for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Mul for &DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Mul for &DenomArray<NUM_PRIMES>
Source§type Output = DenomArray<NUM_PRIMES>
type Output = DenomArray<NUM_PRIMES>
The resulting type after applying the
* operator.Source§fn mul(self, rhs: Self) -> DenomArray<NUM_PRIMES>
fn mul(self, rhs: Self) -> DenomArray<NUM_PRIMES>
Performs the
* operation. Read moreSource§impl<const NUM_PRIMES: usize> Mul<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Mul<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Mul<DenomArray<NUM_PRIMES>> for &DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Mul<DenomArray<NUM_PRIMES>> for &DenomArray<NUM_PRIMES>
Source§type Output = DenomArray<NUM_PRIMES>
type Output = DenomArray<NUM_PRIMES>
The resulting type after applying the
* operator.Source§fn mul(self, rhs: DenomArray<NUM_PRIMES>) -> DenomArray<NUM_PRIMES>
fn mul(self, rhs: DenomArray<NUM_PRIMES>) -> DenomArray<NUM_PRIMES>
Performs the
* operation. Read moreSource§impl<const NUM_PRIMES: usize> MulAssign for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> MulAssign for DenomArray<NUM_PRIMES>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl<const NUM_PRIMES: usize> MulAssign<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> MulAssign<&DenomArray<NUM_PRIMES>> for DenomArray<NUM_PRIMES>
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
Performs the
*= operation. Read moreSource§impl<const NUM_PRIMES: usize> MulAssign<&DenomArray<NUM_PRIMES>> for BigInt
impl<const NUM_PRIMES: usize> MulAssign<&DenomArray<NUM_PRIMES>> for BigInt
Source§fn mul_assign(&mut self, rhs: &DenomArray<NUM_PRIMES>)
fn mul_assign(&mut self, rhs: &DenomArray<NUM_PRIMES>)
Performs the
*= operation. Read moreSource§impl<const NUM_PRIMES: usize> MulAssign<DenomArray<NUM_PRIMES>> for BigInt
impl<const NUM_PRIMES: usize> MulAssign<DenomArray<NUM_PRIMES>> for BigInt
Source§fn mul_assign(&mut self, rhs: DenomArray<NUM_PRIMES>)
fn mul_assign(&mut self, rhs: DenomArray<NUM_PRIMES>)
Performs the
*= operation. Read moreSource§impl<const NUM_PRIMES: usize> One for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> One for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> PartialEq for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> PartialEq for DenomArray<NUM_PRIMES>
Source§impl<const NUM_PRIMES: usize> Pow<u32> for &DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Pow<u32> for &DenomArray<NUM_PRIMES>
Source§type Output = DenomArray<NUM_PRIMES>
type Output = DenomArray<NUM_PRIMES>
The result after applying the operator.
impl<const NUM_PRIMES: usize> StructuralPartialEq for DenomArray<NUM_PRIMES>
Auto Trait Implementations§
impl<const NUM_PRIMES: usize> Freeze for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> RefUnwindSafe for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Send for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Sync for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> Unpin for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> UnsafeUnpin for DenomArray<NUM_PRIMES>
impl<const NUM_PRIMES: usize> UnwindSafe for DenomArray<NUM_PRIMES>
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