MCPcopy Create free account
hub / github.com/arkworks-rs/poly-commit / add_assign

Method add_assign

poly-commit/src/marlin/marlin_pc/data_structures.rs:324–334  ·  view source on GitHub ↗
(&mut self, other: &'a Self)

Source from the content-addressed store, hash-verified

322impl<'a, F: PrimeField, P: DenseUVPolynomial<F>> AddAssign<&'a Self> for Randomness<F, P> {
323 #[inline]
324 fn add_assign(&mut self, other: &'a Self) {
325 self.rand += &other.rand;
326 if let Some(r1) = &mut self.shifted_rand {
327 *r1 += other
328 .shifted_rand
329 .as_ref()
330 .unwrap_or(&kzg10::Randomness::empty());
331 } else {
332 self.shifted_rand = other.shifted_rand.as_ref().map(|r| r.clone());
333 }
334 }
335}
336
337impl<'a, F: PrimeField, P: DenseUVPolynomial<F>> Add<(F, &'a Randomness<F, P>)>

Callers 1

combine_commitmentsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected