snark_verifier/pcs/ipa/
accumulator.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::{loader::Loader, util::arithmetic::CurveAffine};

/// Inner product argument accumulator.
#[derive(Clone, Debug)]
pub struct IpaAccumulator<C, L>
where
    C: CurveAffine,
    L: Loader<C>,
{
    /// $\xi$.
    pub xi: Vec<L::LoadedScalar>,
    /// $U$.
    pub u: L::LoadedEcPoint,
}

impl<C, L> IpaAccumulator<C, L>
where
    C: CurveAffine,
    L: Loader<C>,
{
    /// Initialize a [`IpaAccumulator`].
    pub fn new(xi: Vec<L::LoadedScalar>, u: L::LoadedEcPoint) -> Self {
        Self { xi, u }
    }
}