Skip to content

Commit

Permalink
Add PointEvaluations::{fst,snd} helper methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiencs committed Sep 20, 2024
1 parent b6ad2d0 commit 2fdb5a7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions kimchi/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,22 @@ impl<Evals> PointEvaluations<Evals> {
}
}

impl<Evals: Copy> PointEvaluations<Evals> {
/// Mimic OCaml `point[0]`
///
/// Short for `first`
pub fn fst(&self) -> Evals {
self.zeta
}

/// Mimic OCaml `point[1]`
///
/// Shoft for `second`
pub fn snd(&self) -> Evals {
self.zeta_omega
}
}

impl<Eval> ProofEvaluations<Eval> {
pub fn map<Eval2, FN: Fn(Eval) -> Eval2>(self, f: &FN) -> ProofEvaluations<Eval2> {
let ProofEvaluations {
Expand Down

0 comments on commit 2fdb5a7

Please sign in to comment.