Context
CountMin::merge (src/sketches/countminsketch.rs:245) and Count::merge (src/sketches/countsketch.rs:245) already exist — elementwise counter-array addition. There is no equivalent subtract. The only subtract in this codebase is reconciliation/rateless_iblt.rs, which implements set reconciliation (IBLT), a fundamentally different operation from "subtract one linear sketch's counters from another."
Mirror merge's existing shape: pub fn subtract(&mut self, other: &Self), same dimension-mismatch handling as merge (see merge_requires_matching_dimensions tests).
Related
Context
CountMin::merge(src/sketches/countminsketch.rs:245) andCount::merge(src/sketches/countsketch.rs:245) already exist — elementwise counter-array addition. There is no equivalentsubtract. The onlysubtractin this codebase isreconciliation/rateless_iblt.rs, which implements set reconciliation (IBLT), a fundamentally different operation from "subtract one linear sketch's counters from another."Mirror
merge's existing shape:pub fn subtract(&mut self, other: &Self), same dimension-mismatch handling asmerge(seemerge_requires_matching_dimensionstests).Related
subtract_cpuatomic cost.