Add a check of the form `p1 * s1 + p2 * s2 = t`. Converts it to `p1 * s1 * r + p2 * s2 * r - t * r = 0` where `r` is the current randomness.
(&mut self, p1: G, s1: &G::ScalarField, p2: G, s2: &G::ScalarField, t: G)
| 51 | |
| 52 | /// Add a check of the form `p1 * s1 + p2 * s2 = t`. Converts it to `p1 * s1 * r + p2 * s2 * r - t * r = 0` where `r` is the current randomness. |
| 53 | pub fn add_2(&mut self, p1: G, s1: &G::ScalarField, p2: G, s2: &G::ScalarField, t: G) { |
| 54 | self.add(p1, self.current_random * s1); |
| 55 | self.add(p2, self.current_random * s2); |
| 56 | self.add(t, -self.current_random); |
| 57 | self.current_random *= self.random; |
| 58 | } |
| 59 | |
| 60 | /// Add a check of the form `p1 * s1 + p2 * s2 + p3 * s3 = t`. Converts it to `p1 * s1 * r + p2 * s2 * r + p3 * s3 * r - t * r = 0` where `r` is the current randomness. |
| 61 | pub fn add_3( |