#[non_exhaustive]pub enum Representation {
PowerBasis,
Ntt,
NttShoup,
}Expand description
Possible representations of the underlying polynomial.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PowerBasis
This is the list of coefficients ci, such that the polynomial is c0 + c1
- x + … + c_(degree - 1) * x^(degree - 1)
Ntt
This is the NTT representation of the PowerBasis representation.
NttShoup
This is a “Shoup” representation of the Ntt representation used for faster multiplication.
Trait Implementations§
Source§impl Clone for Representation
impl Clone for Representation
Source§fn clone(&self) -> Representation
fn clone(&self) -> Representation
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 moreSource§impl Debug for Representation
impl Debug for Representation
Source§impl Default for Representation
impl Default for Representation
Source§fn default() -> Representation
fn default() -> Representation
Returns the “default value” for a type. Read more
Source§impl PartialEq for Representation
impl PartialEq for Representation
impl Copy for Representation
impl Eq for Representation
impl StructuralPartialEq for Representation
Auto Trait Implementations§
impl Freeze for Representation
impl RefUnwindSafe for Representation
impl Send for Representation
impl Sync for Representation
impl Unpin for Representation
impl UnwindSafe for Representation
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