[][src]Struct algebraics::traits::ExtendedGCDAndLCM

pub struct ExtendedGCDAndLCM<T> {
    pub gcd: T,
    pub x: T,
    pub y: T,
    pub lcm: T,
}

GCD, LCM, and Bézout coefficients

let result = ExtendedGCD::extended_gcd_lcm(a, b);
assert_eq!(result.x * a + result.y * b, result.gcd);
assert_eq!(result.gcd * result.lcm, a * b);

Fields

gcd: Tx: Ty: Tlcm: T

Trait Implementations

impl<T: Clone> Clone for ExtendedGCDAndLCM<T>[src]

impl<T: Copy> Copy for ExtendedGCDAndLCM<T>[src]

impl<T: Eq> Eq for ExtendedGCDAndLCM<T>[src]

impl<T: PartialEq> PartialEq<ExtendedGCDAndLCM<T>> for ExtendedGCDAndLCM<T>[src]

impl<T: Debug> Debug for ExtendedGCDAndLCM<T>[src]

impl<T: Hash> Hash for ExtendedGCDAndLCM<T>[src]

impl<T> StructuralPartialEq for ExtendedGCDAndLCM<T>[src]

impl<T> StructuralEq for ExtendedGCDAndLCM<T>[src]

Auto Trait Implementations

impl<T> Send for ExtendedGCDAndLCM<T> where
    T: Send

impl<T> Sync for ExtendedGCDAndLCM<T> where
    T: Sync

impl<T> Unpin for ExtendedGCDAndLCM<T> where
    T: Unpin

impl<T> UnwindSafe for ExtendedGCDAndLCM<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for ExtendedGCDAndLCM<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]