pub struct FFTree<F: Field> {Show 13 fields
pub f: BinaryTree<F>,
pub recombine_matrices: BinaryTree<Mat2x2<F>>,
pub decompose_matrices: BinaryTree<Mat2x2<F>>,
pub rational_maps: Vec<RationalMap<F>>,
pub subtree: Option<Box<Self>>,
pub xnn_s: Vec<F>,
pub xnn_s_inv: Vec<F>,
pub z0_s1: Vec<F>,
pub z1_s0: Vec<F>,
pub z0_inv_s1: Vec<F>,
pub z1_inv_s0: Vec<F>,
pub z0z0_rem_xnn_s: Vec<F>,
pub z1z1_rem_xnn_s: Vec<F>,
}
Fields§
§f: BinaryTree<F>
§recombine_matrices: BinaryTree<Mat2x2<F>>
§decompose_matrices: BinaryTree<Mat2x2<F>>
§rational_maps: Vec<RationalMap<F>>
§subtree: Option<Box<Self>>
§xnn_s: Vec<F>
§xnn_s_inv: Vec<F>
§z0_s1: Vec<F>
§z1_s0: Vec<F>
§z0_inv_s1: Vec<F>
§z1_inv_s0: Vec<F>
§z0z0_rem_xnn_s: Vec<F>
§z1z1_rem_xnn_s: Vec<F>
Implementations§
Source§impl<F: Field> FFTree<F>
impl<F: Field> FFTree<F>
pub fn new(leaves: Vec<F>, rational_maps: Vec<RationalMap<F>>) -> Self
Sourcepub fn enter(&self, coeffs: &[F]) -> Vec<F>
pub fn enter(&self, coeffs: &[F]) -> Vec<F>
Converts from coefficient to evaluation representation of a polynomial
Sourcepub fn degree(&self, evals: &[F]) -> usize
pub fn degree(&self, evals: &[F]) -> usize
Evaluates the degree of an evaluation table in O(n log n)
pub fn exit_impl(&self, evals: &[F]) -> Vec<F>
Sourcepub fn exit(&self, evals: &[F]) -> Vec<F>
pub fn exit(&self, evals: &[F]) -> Vec<F>
Converts from evaluation to coefficient representation of a polynomial
Sourcepub fn redc_z0(&self, evals: &[F], a: &[F]) -> Vec<F>
pub fn redc_z0(&self, evals: &[F], a: &[F]) -> Vec<F>
Computes <P(X)*Z_0(x)^(-1) mod a ≀ S>
Z_0 is the vanishing polynomial of S_0
a
must be a polynomial of max degree n/2
having no zeroes in S_0
Sourcepub fn redc_z1(&self, evals: &[F], a: &[F]) -> Vec<F>
pub fn redc_z1(&self, evals: &[F], a: &[F]) -> Vec<F>
Computes <P(X)*Z_1(x)^(-1) mod A ≀ S>
Z_1
is the vanishing polynomial of S_1
A
must be a polynomial of max degree n/2
having no zeroes in S_1
Sourcepub fn modular_reduce(&self, evals: &[F], a: &[F], c: &[F]) -> Vec<F>
pub fn modular_reduce(&self, evals: &[F], a: &[F], c: &[F]) -> Vec<F>
Computes MOD algorithm
a
must be a polynomial of max degree n/2
having no zeroes in S_0
c
must be the evaluation table <Z_0^2 mod a ≀ S>
Sourcepub fn vanish(&self, vanish_domain: &[F]) -> Vec<F>
pub fn vanish(&self, vanish_domain: &[F]) -> Vec<F>
Returns an evaluation of the vanishing polynomial Z(x) = ∏ (x - a_i)
Runtime O(n log^2 n)
. vanishi_domain = [a_0, a_1, ..., a_(n - 1)]
Section 7.1 https://arxiv.org/pdf/2107.08473.pdf
Sourcepub fn subtree_with_size(&self, n: usize) -> &Self
pub fn subtree_with_size(&self, n: usize) -> &Self
Returns a FFTree with n
leaves