-
Notifications
You must be signed in to change notification settings - Fork 162
Refactor compute_deep_composition_poly function #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… more than one column
for poly in trace_polys { | ||
evaluations.push(poly.evaluate_slice(&evaluation_points)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could have the same programming style than in the precedent assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## main #200 +/- ##
==========================================
- Coverage 95.58% 95.56% -0.03%
==========================================
Files 62 62
Lines 6837 6872 +35
==========================================
+ Hits 6535 6567 +32
- Misses 302 305 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments. Note I don't have a whole picture in terms of domain knowledge, so take those with a grain of salt. In terms of style and organization it looks OK.
let poly = (trace_poly.clone() | ||
- Polynomial::new_monomial(trace_poly.evaluate(eval), 0)) | ||
/ (Polynomial::new_monomial(FieldElement::<F>::one(), 1) | ||
- Polynomial::new_monomial(eval.clone(), 0)); | ||
|
||
trace_terms = trace_terms + poly * coeff.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid some of the clones here?
let even_composition_poly_term = (even_composition_poly.clone() | ||
- Polynomial::new_monomial( | ||
even_composition_poly.evaluate(&ood_evaluation_point.clone()), | ||
0, | ||
)) | ||
/ (Polynomial::new_monomial(FieldElement::one(), 1) | ||
- Polynomial::new_monomial(ood_evaluation_point * ood_evaluation_point, 0)); | ||
let fourth_term = (odd_composition_poly.clone() | ||
|
||
let odd_composition_poly_term = (odd_composition_poly.clone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well.
compute_deep_composition_poly refactor
Description
Closes #183.
This PR refactors the
compute_deep_composition_poly
, mainly generalizing for the case the trace has more than one column, or what is the same, that there are more than one trace polynomials.The function has been integrated with Fiat-Shamir too.
Type of change
Please delete options that are not relevant.
Checklist