pub struct Polynomial<F: Field>(pub Array<Elem<F>, U256>);Expand description
A Polynomial is a member of the ring R_q = Z_q[X] / (X^256) of degree-256 polynomials
over the finite field with prime order q.
Polynomials can be added, subtracted, negated, and multiplied by field elements.
Tuple Fields§
§0: Array<Elem<F>, U256>Implementations§
Trait Implementations§
Source§impl<F: Field> Add<&Polynomial<F>> for &Polynomial<F>
impl<F: Field> Add<&Polynomial<F>> for &Polynomial<F>
Source§type Output = Polynomial<F>
type Output = Polynomial<F>
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &Polynomial<F>) -> Polynomial<F>
fn add(self, rhs: &Polynomial<F>) -> Polynomial<F>
Performs the
+ operation. Read moreSource§impl<F: Clone + Field> Clone for Polynomial<F>
impl<F: Clone + Field> Clone for Polynomial<F>
Source§fn clone(&self) -> Polynomial<F>
fn clone(&self) -> Polynomial<F>
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<F: Default + Field> Default for Polynomial<F>
impl<F: Default + Field> Default for Polynomial<F>
Source§fn default() -> Polynomial<F>
fn default() -> Polynomial<F>
Returns the “default value” for a type. Read more
Source§impl<F: Field, D: EncodingSize> Encode<D> for Polynomial<F>
impl<F: Field, D: EncodingSize> Encode<D> for Polynomial<F>
Source§type EncodedSize = <D as EncodingSize>::EncodedPolynomialSize
type EncodedSize = <D as EncodingSize>::EncodedPolynomialSize
Size of the encoded object.
Source§impl<F: Field> Mul<&Polynomial<F>> for Elem<F>
impl<F: Field> Mul<&Polynomial<F>> for Elem<F>
Source§type Output = Polynomial<F>
type Output = Polynomial<F>
The resulting type after applying the
* operator.Source§fn mul(self, rhs: &Polynomial<F>) -> Polynomial<F>
fn mul(self, rhs: &Polynomial<F>) -> Polynomial<F>
Performs the
* operation. Read moreSource§impl<F: Field> Neg for &Polynomial<F>
impl<F: Field> Neg for &Polynomial<F>
Source§type Output = Polynomial<F>
type Output = Polynomial<F>
The resulting type after applying the
- operator.Source§fn neg(self) -> Polynomial<F>
fn neg(self) -> Polynomial<F>
Performs the unary
- operation. Read moreSource§impl<F: Field> Sub<&Polynomial<F>> for &Polynomial<F>
impl<F: Field> Sub<&Polynomial<F>> for &Polynomial<F>
Source§type Output = Polynomial<F>
type Output = Polynomial<F>
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &Polynomial<F>) -> Polynomial<F>
fn sub(self, rhs: &Polynomial<F>) -> Polynomial<F>
Performs the
- operation. Read moreSource§impl<F: Field> Zeroize for Polynomial<F>
Available on crate feature zeroize only.
impl<F: Field> Zeroize for Polynomial<F>
Available on crate feature
zeroize only.impl<F: Copy + Field> Copy for Polynomial<F>
impl<F: Field> StructuralPartialEq for Polynomial<F>
Auto Trait Implementations§
impl<F> Freeze for Polynomial<F>
impl<F> RefUnwindSafe for Polynomial<F>
impl<F> Send for Polynomial<F>
impl<F> Sync for Polynomial<F>
impl<F> Unpin for Polynomial<F>
impl<F> UnwindSafe for Polynomial<F>
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