pub enum PolynomialWithBasis<'a, F: PrimeField> {
Monomial {
polynomial: Cow<'a, Polynomial<'a, F>>,
degree_bound: Option<usize>,
},
Lagrange {
evaluations: Cow<'a, Evaluations<F>>,
},
}
Variants§
Monomial
A polynomial in monomial basis, along with information about its degree bound (if any).
Lagrange
A polynomial in Lagrange basis, along with information about its degree bound (if any).
Fields
§
evaluations: Cow<'a, Evaluations<F>>
Implementations§
Source§impl<'a, F: PrimeField> PolynomialWithBasis<'a, F>
impl<'a, F: PrimeField> PolynomialWithBasis<'a, F>
pub fn new_monomial_basis_ref( polynomial: &'a Polynomial<'_, F>, degree_bound: Option<usize>, ) -> Self
pub fn new_monomial_basis( polynomial: Polynomial<'a, F>, degree_bound: Option<usize>, ) -> Self
pub fn new_dense_monomial_basis_ref( polynomial: &'a DensePolynomial<F>, degree_bound: Option<usize>, ) -> Self
pub fn new_dense_monomial_basis( polynomial: DensePolynomial<F>, degree_bound: Option<usize>, ) -> Self
pub fn new_sparse_monomial_basis_ref( polynomial: &'a SparsePolynomial<F>, degree_bound: Option<usize>, ) -> Self
pub fn new_sparse_monomial_basis( polynomial: SparsePolynomial<F>, degree_bound: Option<usize>, ) -> Self
pub fn new_lagrange_basis(evaluations: EvaluationsOnDomain<F>) -> Self
pub fn new_lagrange_basis_ref(evaluations: &'a EvaluationsOnDomain<F>) -> Self
pub fn is_in_monomial_basis(&self) -> bool
Sourcepub fn degree_bound(&self) -> Option<usize>
pub fn degree_bound(&self) -> Option<usize>
Retrieve the degree bound in self
.
pub fn is_in_lagrange_basis(&self) -> bool
pub fn domain(&self) -> Option<EvaluationDomain<F>>
pub fn evaluate(&self, point: F) -> F
Trait Implementations§
Source§impl<'a, F: Clone + PrimeField> Clone for PolynomialWithBasis<'a, F>
impl<'a, F: Clone + PrimeField> Clone for PolynomialWithBasis<'a, F>
Source§fn clone(&self) -> PolynomialWithBasis<'a, F>
fn clone(&self) -> PolynomialWithBasis<'a, F>
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 moreAuto Trait Implementations§
impl<'a, F> Freeze for PolynomialWithBasis<'a, F>where
F: Freeze,
impl<'a, F> RefUnwindSafe for PolynomialWithBasis<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for PolynomialWithBasis<'a, F>
impl<'a, F> Sync for PolynomialWithBasis<'a, F>
impl<'a, F> Unpin for PolynomialWithBasis<'a, F>where
F: Unpin,
impl<'a, F> UnwindSafe for PolynomialWithBasis<'a, F>where
F: UnwindSafe + RefUnwindSafe,
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