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

Method sub_assign

poly-commit/src/data_structures.rs:340–343  ·  view source on GitHub ↗
(&mut self, (coeff, other): (F, &'a LinearCombination<F>))

Source from the content-addressed store, hash-verified

338
339impl<'a, F: Field> SubAssign<(F, &'a LinearCombination<F>)> for LinearCombination<F> {
340 fn sub_assign(&mut self, (coeff, other): (F, &'a LinearCombination<F>)) {
341 self.terms
342 .extend(other.terms.iter().map(|(c, t)| (-coeff * c, t.clone())));
343 }
344}
345
346impl<'a, F: Field> AddAssign<&'a LinearCombination<F>> for LinearCombination<F> {

Callers

nothing calls this directly

Calls 2

iterMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected