Struct blsttc::poly::Poly [−][src]
pub struct Poly { /* fields omitted */ }
Expand description
A univariate polynomial in the prime field.
Implementations
Creates a random polynomial.
Panics
Panics if the degree
is too large for the coefficients to fit into a Vec
.
Creates a random polynomial. This constructor is identical to the Poly::random()
constructor in every way except that this constructor will return an Err
where
try_random
would return an error.
pub fn interpolate<T, U, I>(samples_repr: I) -> Self where
I: IntoIterator<Item = (T, U)>,
T: IntoFr,
U: IntoFr,
pub fn interpolate<T, U, I>(samples_repr: I) -> Self where
I: IntoIterator<Item = (T, U)>,
T: IntoFr,
U: IntoFr,
Returns the unique polynomial f
of degree samples.len() - 1
with the given values
(x, f(x))
.
Returns the corresponding commitment.
Trait Implementations
Performs the +=
operation. Read more
A debug statement where the coeff
vector of prime field elements has been redacted.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Creates a new Poly
instance from a vector of prime field elements representing the
coefficients of the polynomial.
Performs the *=
operation. Read more
Performs the *=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl RefUnwindSafe for Poly
impl UnwindSafe for Poly
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V