Skip to content

Commit

Permalink
WIP: idea of compute_combined_cross_terms
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Oct 14, 2024
1 parent e44364a commit 2e472a3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions mvpoly/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,30 @@ pub trait MVPoly<F: PrimeField, const N: usize, const D: usize>:
/// variable in each monomial is of maximum degree 1.
fn is_multilinear(&self) -> bool;
}

/// Compute the cross terms of a list of polynomials. The polynomials are
/// linearly combined using the power of a combiner, often called `α`.
/// The combiner is considered as a variable of the multi-variate polynomial,
/// therefore increasing the overall degree by one.
///
/// All polynomials are supposed to be given as multivariate polynomials of the
/// same degree and the same number of variables, even if they do not have the
/// same number of variables nor the same degree.
/// Therefore, `N` is the maximum number of variables of the polynomials and `D`
/// is the maximum degree of the polynomials.
fn _compute_combined_cross_terms<
F: PrimeField,
const N: usize,
const D: usize,
T: MVPoly<F, N, D>,
>(
_polys: Vec<T>,
_combiner1: F,
_combiner2: F,
_eval1: [F; N],
_eval2: [F; N],
_u1: [F; N],
_u2: [F; N],
) -> HashMap<usize, F> {
unimplemented!("TODO")
}

0 comments on commit 2e472a3

Please sign in to comment.