pub struct XgcdOutput<const LIMBS: usize, GCD: Copy> {
pub gcd: GCD,
pub x: Int<LIMBS>,
pub y: Int<LIMBS>,
pub lhs_on_gcd: Uint<LIMBS>,
pub rhs_on_gcd: Uint<LIMBS>,
}Expand description
Container for the processed output of the Binary XGCD algorithm.
Fields§
§gcd: GCDGreatest common divisor
x: Int<LIMBS>x;
y: Int<LIMBS>y;
lhs_on_gcd: Uint<LIMBS>lhs / gcd
rhs_on_gcd: Uint<LIMBS>rhs / gcd
Implementations§
Source§impl<const LIMBS: usize, GCD: Copy> XgcdOutput<LIMBS, GCD>
impl<const LIMBS: usize, GCD: Copy> XgcdOutput<LIMBS, GCD>
Sourcepub const fn bezout_coefficients(&self) -> (Int<LIMBS>, Int<LIMBS>)
pub const fn bezout_coefficients(&self) -> (Int<LIMBS>, Int<LIMBS>)
Obtain a copy of the Bézout coefficients.
Source§impl<const LIMBS: usize> XgcdOutput<LIMBS, OddUint<LIMBS>>
impl<const LIMBS: usize> XgcdOutput<LIMBS, OddUint<LIMBS>>
pub(crate) const fn from_pattern_output( output: RawXgcdOutput<LIMBS, PatternMatrix<LIMBS>>, ) -> Self
pub(crate) const fn to_nz_output( self, k: u32, swap: Choice, ) -> XgcdOutput<LIMBS, NonZeroUint<LIMBS>>
Trait Implementations§
Source§impl<const LIMBS: usize, GCD: Clone + Copy> Clone for XgcdOutput<LIMBS, GCD>
impl<const LIMBS: usize, GCD: Clone + Copy> Clone for XgcdOutput<LIMBS, GCD>
Source§fn clone(&self) -> XgcdOutput<LIMBS, GCD>
fn clone(&self) -> XgcdOutput<LIMBS, GCD>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const LIMBS: usize, GCD: Copy + Copy> Copy for XgcdOutput<LIMBS, GCD>
Auto Trait Implementations§
impl<const LIMBS: usize, GCD> Freeze for XgcdOutput<LIMBS, GCD>where
GCD: Freeze,
impl<const LIMBS: usize, GCD> RefUnwindSafe for XgcdOutput<LIMBS, GCD>where
GCD: RefUnwindSafe,
impl<const LIMBS: usize, GCD> Send for XgcdOutput<LIMBS, GCD>where
GCD: Send,
impl<const LIMBS: usize, GCD> Sync for XgcdOutput<LIMBS, GCD>where
GCD: Sync,
impl<const LIMBS: usize, GCD> Unpin for XgcdOutput<LIMBS, GCD>where
GCD: Unpin,
impl<const LIMBS: usize, GCD> UnsafeUnpin for XgcdOutput<LIMBS, GCD>where
GCD: UnsafeUnpin,
impl<const LIMBS: usize, GCD> UnwindSafe for XgcdOutput<LIMBS, GCD>where
GCD: UnwindSafe,
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