chore: Update `k` to be obtained from struct

This commit is contained in:
CPerezz 2023-02-28 09:20:23 +01:00
parent a4cc9f60e0
commit 580d982a64
No known key found for this signature in database
GPG Key ID: 6EE573EDC452F806
3 changed files with 2 additions and 15 deletions

View File

@ -52,7 +52,7 @@ impl<C: CurveAffine> Argument<C> {
#[cfg(feature = "multicore")]
let random_poly = {
let n_threads = current_num_threads();
let n = 1usize << domain.k() as usize;
let n = 1usize << domain.k as usize;
let n_chunks = n_threads + if n % n_threads != 0 { 1 } else { 0 };
let mut rand_vec = vec![C::Scalar::ZERO; n];

View File

@ -130,14 +130,6 @@ impl<F, B> Polynomial<F, B> {
pub fn num_coeffs(&self) -> usize {
self.values.len()
}
/// Allows to create a Polynomial from a Vec.
pub fn from_evals(vector: Vec<F>) -> Self {
Polynomial {
values: vector,
_marker: PhantomData,
}
}
}
pub(crate) fn batch_invert_assigned<F: Field>(

View File

@ -19,7 +19,7 @@ use std::marker::PhantomData;
#[derive(Clone, Debug)]
pub struct EvaluationDomain<F: Field> {
n: u64,
k: u32,
pub(crate) k: u32,
extended_k: u32,
omega: F,
omega_inv: F,
@ -142,11 +142,6 @@ impl<F: WithSmallOrderMulGroup<3>> EvaluationDomain<F> {
}
}
/// Returns the `k` or Degree associated to the domain.
pub(crate) fn k(&self) -> usize {
self.k as usize
}
/// Obtains a polynomial in Lagrange form when given a vector of Lagrange
/// coefficients of size `n`; panics if the provided vector is the wrong
/// length.