pub struct Polynomial { /* private fields */ }Expand description
A degree-(t-1) polynomial over the scalar field used for VSS.
Coefficients are little-endian: f(X) = sum coeff[k] * X^k.
Implementations§
Source§impl Polynomial
impl Polynomial
Sourcepub fn from_coefficients(coeff: Vec<Scalar>) -> Self
pub fn from_coefficients(coeff: Vec<Scalar>) -> Self
Build a polynomial from its coefficient vector. coeff[0] is the
constant term (the committed secret for a VSS polynomial).
Sourcepub fn degree_plus_one(&self) -> usize
pub fn degree_plus_one(&self) -> usize
Number of coefficients — equal to the threshold T for a degree
T-1 polynomial.
Sourcepub fn coefficients(&self) -> &[Scalar]
pub fn coefficients(&self) -> &[Scalar]
Borrow the coefficient vector.
Auto Trait Implementations§
impl Freeze for Polynomial
impl RefUnwindSafe for Polynomial
impl Send for Polynomial
impl Sync for Polynomial
impl Unpin for Polynomial
impl UnsafeUnpin for Polynomial
impl UnwindSafe for Polynomial
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