export type MultiSetArray = Array<[T, number]>; export type KeyedData = [key: string, value: T]; /** * A multiset of data. */ export declare class MultiSet { #private; constructor(data?: MultiSetArray); toString(indent?: boolean): string; toJSON(): string; static fromJSON(json: string): MultiSet; /** * Apply a function to all records in the collection. */ map(f: (data: T) => U): MultiSet; /** * Filter out records for which a function f(record) evaluates to False. */ filter(f: (data: T) => boolean): MultiSet; /** * Negate all multiplicities in the collection. */ negate(): MultiSet; /** * Concatenate two collections together. */ concat(other: MultiSet): MultiSet; /** * Produce as output a collection that is logically equivalent to the input * but which combines identical instances of the same record into one * (record, multiplicity) pair. */ consolidate(): MultiSet; extend(other: MultiSet | MultiSetArray): void; add(item: T, multiplicity: number): void; getInner(): MultiSetArray; }