Struct ml_dsa::algebra::Polynomial
source · pub struct Polynomial(pub Array<FieldElement, U256>);
Expand description
An element of the ring R_q
, i.e., a polynomial over Z_q
of degree 255
Tuple Fields§
§0: Array<FieldElement, U256>
Implementations§
source§impl Polynomial
impl Polynomial
pub fn sample_cbd<Eta>(B: &PrfOutput<Eta>) -> Selfwhere
Eta: CbdSamplingSize,
source§impl Polynomial
impl Polynomial
pub fn ntt(&self) -> NttPolynomial
Trait Implementations§
source§impl Add<&Polynomial> for &Polynomial
impl Add<&Polynomial> for &Polynomial
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
+
operator.source§fn add(self, rhs: &Polynomial) -> Polynomial
fn add(self, rhs: &Polynomial) -> Polynomial
Performs the
+
operation. Read moresource§impl Clone for Polynomial
impl Clone for Polynomial
source§fn clone(&self) -> Polynomial
fn clone(&self) -> Polynomial
Returns a copy 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 Polynomial
impl Debug for Polynomial
source§impl Default for Polynomial
impl Default for Polynomial
source§fn default() -> Polynomial
fn default() -> Polynomial
Returns the “default value” for a type. Read more
source§impl<D: EncodingSize> Encode<D> for Polynomial
impl<D: EncodingSize> Encode<D> for Polynomial
type EncodedSize = <D as EncodingSize>::EncodedPolynomialSize
fn encode(&self) -> Array<u8, Self::EncodedSize>
fn decode(enc: &Array<u8, Self::EncodedSize>) -> Self
source§impl Mul<&Polynomial> for FieldElement
impl Mul<&Polynomial> for FieldElement
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
*
operator.source§fn mul(self, rhs: &Polynomial) -> Polynomial
fn mul(self, rhs: &Polynomial) -> Polynomial
Performs the
*
operation. Read moresource§impl PartialEq for Polynomial
impl PartialEq for Polynomial
source§fn eq(&self, other: &Polynomial) -> bool
fn eq(&self, other: &Polynomial) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sub<&Polynomial> for &Polynomial
impl Sub<&Polynomial> for &Polynomial
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
-
operator.source§fn sub(self, rhs: &Polynomial) -> Polynomial
fn sub(self, rhs: &Polynomial) -> Polynomial
Performs the
-
operation. Read moreimpl Copy for Polynomial
impl StructuralPartialEq for Polynomial
Auto Trait Implementations§
impl Freeze for Polynomial
impl RefUnwindSafe for Polynomial
impl Send for Polynomial
impl Sync for Polynomial
impl Unpin for Polynomial
impl UnwindSafe for Polynomial
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