Given a list of elements as `updates`, generates a polynomial `(updates[0]-x) * (updates[1]-x) * (updates[2] - x)...(updates[last] - x)`.
(updates: &[F])
| 84 | { |
| 85 | /// Given a list of elements as `updates`, generates a polynomial `(updates[0]-x) * (updates[1]-x) * (updates[2] - x)...(updates[last] - x)`. |
| 86 | pub fn generate(updates: &[F]) -> Self { |
| 87 | if updates.is_empty() { |
| 88 | // Returning constant polynomial with value one as the evaluation of this polynomial is multiplied by the old witness |
| 89 | Self(DensePolynomial::from_coefficients_slice(&[F::one()])) |
| 90 | } else { |
| 91 | Self(poly_from_given_updates(updates)) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /// Evaluate this polynomial at `x` |
| 96 | pub fn eval(&self, x: &F) -> F { |
nothing calls this directly
no test coverage detected