@@ -121,6 +121,12 @@ impl<S: SelfEmulation> Accumulator<S> {
121121 self . rhs . collapse ( ) ;
122122 }
123123
124+ /// Evaluates the variable and fixed parts of the Accumulator collapsing
125+ /// each side to a single point.
126+ pub fn fully_collapse ( & self , fixed_bases : & BTreeMap < String , S :: C > ) -> ( S :: C , S :: C ) {
127+ ( self . lhs . eval ( fixed_bases) , self . rhs . eval ( fixed_bases) )
128+ }
129+
124130 /// Accumulates several accumulators together. The resulting acc will
125131 /// satisfy the invariant iff all the accumulators individually do.
126132 pub fn accumulate ( accs : & [ Self ] ) -> Self {
@@ -293,6 +299,21 @@ impl<S: SelfEmulation> AssignedAccumulator<S> {
293299 self . rhs . collapse ( layouter, curve_chip, scalar_chip)
294300 }
295301
302+ /// Evaluates the variable and fixed parts of the AssignedAccumulator
303+ /// collapsing each side to a single point.
304+ ///
305+ /// This will likely be an expensive in-circuit operation.
306+ pub fn fully_collapse (
307+ & self ,
308+ layouter : & mut impl Layouter < S :: F > ,
309+ curve_chip : & S :: CurveChip ,
310+ fixed_bases : & BTreeMap < String , S :: C > ,
311+ ) -> Result < ( S :: AssignedPoint , S :: AssignedPoint ) , Error > {
312+ let lhs_pt = self . lhs . eval ( layouter, curve_chip, fixed_bases) ?;
313+ let rhs_pt = self . rhs . eval ( layouter, curve_chip, fixed_bases) ?;
314+ Ok ( ( lhs_pt, rhs_pt) )
315+ }
316+
296317 /// Accumulates several accumulators together. The resulting acc will
297318 /// satisfy the invariant iff all the accumulators individually do.
298319 pub fn accumulate (
0 commit comments