[−][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][+]
impl<'a, 'b> Add<&'a Scalar> for &'b Polynomial
[src][+]
type Output = Polynomial
fn add(self, constant: &'a Scalar) -> Polynomial
[src][−]
impl<'a, 'b> AddAssign<&'a Polynomial> for Polynomial
[src][+]
impl<'a, 'b> AddAssign<(Scalar, &'a Polynomial)> for Polynomial
[src][+]
impl Clone for Polynomial
[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][+]
type Output = Polynomial
fn mul(self, other: &'a Polynomial) -> Polynomial
[src][−]
impl<'a, 'b> Mul<&'a Scalar> for &'b Polynomial
[src][+]
type Output = Polynomial
fn mul(self, constant: &'a Scalar) -> Polynomial
[src][−]
impl Neg for Polynomial
[src][+]
impl PartialEq<Polynomial> for Polynomial
[src][+]
impl StructuralEq for Polynomial
[src]
impl StructuralPartialEq for Polynomial
[src]
impl<'a, 'b> Sub<&'a Polynomial> for &'b Polynomial
[src][+]
impl<'a, 'b> Sub<&'a Scalar> for &'b Polynomial
[src][+]
impl<'a, 'b> SubAssign<&'a Polynomial> for 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,
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,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,