Struct scuttlebutt::field::polynomial::NewtonPolynomial
source · pub struct NewtonPolynomial<F: FiniteField> { /* private fields */ }
Expand description
A polynomial in Newton polynomial form.
Implementations§
source§impl<F: FiniteField> NewtonPolynomial<F>
impl<F: FiniteField> NewtonPolynomial<F>
sourcepub fn interpolate_in_place(&self, values: &mut [F])
pub fn interpolate_in_place(&self, values: &mut [F])
Given values
, find the coefficients for the Newton polynomial.
sourcepub fn basis_polynomial(&self, point: F, polynomial: &mut Vec<F>)
pub fn basis_polynomial(&self, point: F, polynomial: &mut Vec<F>)
Compute the Newton basis polynomial on point
.
sourcepub fn eval_with_basis_polynomial(
&self,
polynomial: &[F],
coefficients: &[F]
) -> F
pub fn eval_with_basis_polynomial( &self, polynomial: &[F], coefficients: &[F] ) -> F
Evaluate the Newton polynomial given a pre-computed basis polynomial.
Trait Implementations§
source§impl<F: Clone + FiniteField> Clone for NewtonPolynomial<F>
impl<F: Clone + FiniteField> Clone for NewtonPolynomial<F>
source§fn clone(&self) -> NewtonPolynomial<F>
fn clone(&self) -> NewtonPolynomial<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<F> Freeze for NewtonPolynomial<F>
impl<F> RefUnwindSafe for NewtonPolynomial<F>where
F: RefUnwindSafe,
impl<F> Send for NewtonPolynomial<F>
impl<F> Sync for NewtonPolynomial<F>
impl<F> Unpin for NewtonPolynomial<F>where
F: Unpin,
impl<F> UnwindSafe for NewtonPolynomial<F>where
F: UnwindSafe,
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