pub enum DenseOrSparsePolynomial<'a, F: 'a + Field> {
SPolynomial(Cow<'a, SparsePolynomial<F>>),
DPolynomial(Cow<'a, DensePolynomial<F>>),
}
Expand description
Represents either a sparse polynomial or a dense one.
Variants
SPolynomial(Cow<'a, SparsePolynomial<F>>)
Represents the case where self
is a sparse polynomial
DPolynomial(Cow<'a, DensePolynomial<F>>)
Represents the case where self
is a dense polynomial
Implementations
sourceimpl<F: Field> DenseOrSparsePolynomial<'_, F>
impl<F: Field> DenseOrSparsePolynomial<'_, F>
sourcepub fn divide_with_q_and_r(
&self,
divisor: &Self
) -> Option<(DensePolynomial<F>, DensePolynomial<F>)>
pub fn divide_with_q_and_r(
&self,
divisor: &Self
) -> Option<(DensePolynomial<F>, DensePolynomial<F>)>
Divide self by another (sparse or dense) polynomial, and returns the quotient and remainder.
sourceimpl<F: PrimeField> DenseOrSparsePolynomial<'_, F>
impl<F: PrimeField> DenseOrSparsePolynomial<'_, F>
sourcepub fn evaluate_over_domain(
poly: impl Into<Self>,
domain: EvaluationDomain<F>
) -> Evaluations<F>
pub fn evaluate_over_domain(
poly: impl Into<Self>,
domain: EvaluationDomain<F>
) -> Evaluations<F>
Construct Evaluations
by evaluating a polynomial over the domain domain
.
Trait Implementations
sourceimpl<'a, F: Clone + 'a + Field> Clone for DenseOrSparsePolynomial<'a, F>
impl<'a, F: Clone + 'a + Field> Clone for DenseOrSparsePolynomial<'a, F>
sourcefn clone(&self) -> DenseOrSparsePolynomial<'a, F>
fn clone(&self) -> DenseOrSparsePolynomial<'a, F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a, F: 'a + Field> From<&'a DensePolynomial<F>> for DenseOrSparsePolynomial<'a, F>
impl<'a, F: 'a + Field> From<&'a DensePolynomial<F>> for DenseOrSparsePolynomial<'a, F>
sourcefn from(other: &'a DensePolynomial<F>) -> Self
fn from(other: &'a DensePolynomial<F>) -> Self
Performs the conversion.
sourceimpl<'a, F: Field> From<&'a SparsePolynomial<F>> for DenseOrSparsePolynomial<'a, F>
impl<'a, F: Field> From<&'a SparsePolynomial<F>> for DenseOrSparsePolynomial<'a, F>
sourcefn from(other: &'a SparsePolynomial<F>) -> Self
fn from(other: &'a SparsePolynomial<F>) -> Self
Performs the conversion.
sourceimpl<F: Field> From<DensePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
impl<F: Field> From<DensePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
sourcefn from(other: DensePolynomial<F>) -> Self
fn from(other: DensePolynomial<F>) -> Self
Performs the conversion.
sourceimpl<F: Field> From<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
impl<F: Field> From<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
sourcefn from(other: SparsePolynomial<F>) -> Self
fn from(other: SparsePolynomial<F>) -> Self
Performs the conversion.
sourceimpl<F: Field> Into<DensePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
impl<F: Field> Into<DensePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
sourcefn into(self) -> DensePolynomial<F>
fn into(self) -> DensePolynomial<F>
Performs the conversion.
sourceimpl<F: Field> TryInto<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
impl<F: Field> TryInto<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
Auto Trait Implementations
impl<'a, F> RefUnwindSafe for DenseOrSparsePolynomial<'a, F> where
F: RefUnwindSafe,
impl<'a, F> Send for DenseOrSparsePolynomial<'a, F>
impl<'a, F> Sync for DenseOrSparsePolynomial<'a, F>
impl<'a, F> Unpin for DenseOrSparsePolynomial<'a, F> where
F: Unpin,
impl<'a, F> UnwindSafe for DenseOrSparsePolynomial<'a, F> where
F: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more