[][src]Struct snarkos_algorithms::fft::DensePolynomial

pub struct DensePolynomial<F: Field> {
    pub coeffs: Vec<F>,
}

Stores a polynomial in coefficient form.

Fields

coeffs: Vec<F>

The coefficient of x^i is stored at location i in self.coeffs.

Implementations

impl<F: Field> DensePolynomial<F>[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: &[F]) -> Self[src]

Constructs a new polynomial from a list of coefficients.

pub fn from_coefficients_vec(coeffs: Vec<F>) -> Self[src]

Constructs a new polynomial from a list of coefficients.

pub fn degree(&self) -> usize[src]

Returns the degree of the polynomial.

pub fn evaluate(&self, point: F) -> F[src]

Evaluates self at the given point in the field.

pub fn naive_mul(&self, other: &Self) -> Self[src]

Perform a naive n^2 multiplicatoin of self by other.

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<F: PrimeField> DensePolynomial<F>[src]

pub fn mul_by_vanishing_poly(
    &self,
    domain: EvaluationDomain<F>
) -> DensePolynomial<F>
[src]

Multiply self by the vanishing polynomial for the domain domain. Returns the quotient and remainder of the division.

pub fn divide_by_vanishing_poly(
    &self,
    domain: EvaluationDomain<F>
) -> Option<(DensePolynomial<F>, DensePolynomial<F>)>
[src]

Divide self by the vanishing polynomial for the domain domain. Returns the quotient and remainder of the division.

impl<F: PrimeField> DensePolynomial<F>[src]

pub fn evaluate_over_domain_by_ref(
    &self,
    domain: EvaluationDomain<F>
) -> Evaluations<F>
[src]

Evaluate self over domain.

pub fn evaluate_over_domain(self, domain: EvaluationDomain<F>) -> Evaluations<F>[src]

Evaluate self over domain.

Trait Implementations

impl<'a, 'b, F: Field> Add<&'a DensePolynomial<F>> for &'b DensePolynomial<F>[src]

type Output = DensePolynomial<F>

The resulting type after applying the + operator.

impl<'a, 'b, F: Field> AddAssign<&'a DensePolynomial<F>> for DensePolynomial<F>[src]

impl<'a, 'b, F: Field> AddAssign<(F, &'a DensePolynomial<F>)> for DensePolynomial<F>[src]

impl<F: Field> CanonicalDeserialize for DensePolynomial<F>[src]

impl<F: Field> CanonicalSerialize for DensePolynomial<F>[src]

impl<F: Clone + Field> Clone for DensePolynomial<F>[src]

impl<F: Field> Debug for DensePolynomial<F>[src]

impl<F: Default + Field> Default for DensePolynomial<F>[src]

impl<F: Field> Deref for DensePolynomial<F>[src]

type Target = [F]

The resulting type after dereferencing.

impl<F: Field> DerefMut for DensePolynomial<F>[src]

impl<'a, 'b, F: Field> Div<&'a DensePolynomial<F>> for &'b DensePolynomial<F>[src]

type Output = DensePolynomial<F>

The resulting type after applying the / operator.

impl<F: Eq + Field> Eq for DensePolynomial<F>[src]

impl<'a, F: 'a + Field> From<&'a DensePolynomial<F>> for DenseOrSparsePolynomial<'a, F>[src]

impl<F: Field, '_> From<DensePolynomial<F>> for DenseOrSparsePolynomial<'_, F>[src]

impl<F: Hash + Field> Hash for DensePolynomial<F>[src]

impl<F: Field> Into<DensePolynomial<F>> for SparsePolynomial<F>[src]

impl<F: Field, '_> Into<DensePolynomial<F>> for DenseOrSparsePolynomial<'_, F>[src]

impl<'a, 'b, F: PrimeField> Mul<&'a DensePolynomial<F>> for &'b DensePolynomial<F>[src]

Performs O(nlogn) multiplication of polynomials if F is smooth.

type Output = DensePolynomial<F>

The resulting type after applying the * operator.

impl<F: Field> Neg for DensePolynomial<F>[src]

type Output = DensePolynomial<F>

The resulting type after applying the - operator.

impl<F: PartialEq + Field> PartialEq<DensePolynomial<F>> for DensePolynomial<F>[src]

impl<F: Field> StructuralEq for DensePolynomial<F>[src]

impl<F: Field> StructuralPartialEq for DensePolynomial<F>[src]

impl<'a, 'b, F: Field> Sub<&'a DensePolynomial<F>> for &'b DensePolynomial<F>[src]

type Output = DensePolynomial<F>

The resulting type after applying the - operator.

impl<'a, 'b, F: Field> SubAssign<&'a DensePolynomial<F>> for DensePolynomial<F>[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for DensePolynomial<F> where
    F: RefUnwindSafe

impl<F> Send for DensePolynomial<F>

impl<F> Sync for DensePolynomial<F>

impl<F> Unpin for DensePolynomial<F> where
    F: Unpin

impl<F> UnwindSafe for DensePolynomial<F> where
    F: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,