[−][src]Struct dusk_plonk::fft::Polynomial
Polynomial represents a polynomial in coeffiient form.
Fields
coeffs: Vec<Scalar>
The coefficient of x^i
is stored at location i
in self.coeffs
.
Implementations
impl Polynomial
[src]
pub fn zero() -> Self
[src]
Returns the zero polynomial.
pub fn is_zero(&self) -> bool
[src]
Checks if the given polynomial is zero.
pub fn from_coefficients_slice(coeffs: &[Scalar]) -> Self
[src]
Constructs a new polynomial from a list of coefficients.
pub fn from_coefficients_vec(coeffs: Vec<Scalar>) -> Self
[src]
Constructs a new polynomial from a list of coefficients.
Panics
When the length of the coeffs is zero.
pub fn degree(&self) -> usize
[src]
Returns the degree of the polynomial.
pub fn evaluate(&self, point: &Scalar) -> Scalar
[src]
Evaluates self
at the given point
in the field.
pub fn rand<R: Rng>(d: usize, rng: &mut R) -> Self
[src]
Outputs a polynomial of degree d
where each coefficient is sampled
uniformly at random from the field F
.
impl Polynomial
[src]
pub fn ruffini(&self, z: Scalar) -> Polynomial
[src]
Divides self
by x-z using Ruffinis method
Trait Implementations
impl<'a, 'b> Add<&'a Polynomial> for &'b Polynomial
[src]
type Output = Polynomial
The resulting type after applying the +
operator.
fn add(self, other: &'a Polynomial) -> Polynomial
[src]
impl<'a, 'b> Add<&'a Scalar> for &'b Polynomial
[src]
Convenience Trait to sub a scalar and polynomial
type Output = Polynomial
The resulting type after applying the +
operator.
fn add(self, constant: &'a Scalar) -> Polynomial
[src]
impl<'a, 'b> AddAssign<&'a Polynomial> for Polynomial
[src]
fn add_assign(&mut self, other: &'a Polynomial)
[src]
impl<'a, 'b> AddAssign<(Scalar, &'a Polynomial)> for Polynomial
[src]
fn add_assign(&mut self, (f, other): (Scalar, &'a Polynomial))
[src]
impl Clone for Polynomial
[src]
fn clone(&self) -> Polynomial
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Polynomial
[src]
impl Deref for Polynomial
[src]
impl DerefMut for Polynomial
[src]
impl Eq for Polynomial
[src]
impl<'a, 'b> Mul<&'a Polynomial> for &'b Polynomial
[src]
Performs O(nlogn) multiplication of polynomials if F is smooth.
type Output = Polynomial
The resulting type after applying the *
operator.
fn mul(self, other: &'a Polynomial) -> Polynomial
[src]
impl<'a, 'b> Mul<&'a Scalar> for &'b Polynomial
[src]
Convenience Trait to multiply a scalar and polynomial
type Output = Polynomial
The resulting type after applying the *
operator.
fn mul(self, constant: &'a Scalar) -> Polynomial
[src]
impl Neg for Polynomial
[src]
type Output = Polynomial
The resulting type after applying the -
operator.
fn neg(self) -> Polynomial
[src]
impl PartialEq<Polynomial> for Polynomial
[src]
fn eq(&self, other: &Polynomial) -> bool
[src]
fn ne(&self, other: &Polynomial) -> bool
[src]
impl StructuralEq for Polynomial
[src]
impl StructuralPartialEq for Polynomial
[src]
impl<'a, 'b> Sub<&'a Polynomial> for &'b Polynomial
[src]
type Output = Polynomial
The resulting type after applying the -
operator.
fn sub(self, other: &'a Polynomial) -> Polynomial
[src]
impl<'a, 'b> Sub<&'a Scalar> for &'b Polynomial
[src]
type Output = Polynomial
The resulting type after applying the -
operator.
fn sub(self, constant: &'a Scalar) -> Polynomial
[src]
impl<'a, 'b> SubAssign<&'a Polynomial> for Polynomial
[src]
fn sub_assign(&mut self, other: &'a Polynomial)
[src]
impl Sum<Polynomial> for Polynomial
[src]
Auto Trait Implementations
impl RefUnwindSafe for Polynomial
impl Send for Polynomial
impl Sync for Polynomial
impl Unpin for Polynomial
impl UnwindSafe for Polynomial
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,