pub struct RnsFrac {
pub residues: Vec<Option<u32>>,
pub basis: Basis,
}Expand description
A rational carried as one field element p·q⁻¹ (mod pᵢ) per channel.
A channel whose prime divides the denominator is invalid for this value (the fraction is not p-adically integral there); it is masked out of this value’s reconstruction. This per-value mask is correctness bookkeeping for one number — never the unsound global “skip channels to save power” idea.
Fields§
§residues: Vec<Option<u32>>None marks a channel invalid for this value (prime divides denom).
basis: BasisImplementations§
Trait Implementations§
Source§impl Finite for RnsFrac
impl Finite for RnsFrac
fn basis(&self) -> &Basis
fn add(&self, o: &Self) -> Self
fn sub(&self, o: &Self) -> Self
fn mul(&self, o: &Self) -> Self
Auto Trait Implementations§
impl Freeze for RnsFrac
impl RefUnwindSafe for RnsFrac
impl Send for RnsFrac
impl Sync for RnsFrac
impl Unpin for RnsFrac
impl UnsafeUnpin for RnsFrac
impl UnwindSafe for RnsFrac
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more