Skip to content

Add subtract to CountMin/Count (CMS/CountSketch), mirroring existing merge #69

Description

@milindsrivastava1997

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions