import { LogNum } from "./logNum.js"; /** A map from items to log counts. */ export declare class LogCounter { private readonly counts; constructor(counts: ReadonlyMap, totalCache?: LogNum); static from(data: string): LogCounter; static from(data: Iterable): LogCounter; static from(data: Iterable, map: (item: U) => T): LogCounter; /** The number of distinct items. */ get distinct(): LogNum; private totalCache; /** The total number of all items. */ get total(): LogNum; /** The log count of the given item. */ get(item: T): LogNum; /** Returns an iterable of [item, log count] pairs. */ entries(): IterableIterator<[T, LogNum]>; /** Returns a list of items that satisfy the given predicate. */ filterKeys(fn: (item: T, count: LogNum) => boolean): T[]; /** Returns an iterable of [item, log probability] pairs. */ frequencies(): IterableIterator<[T, LogNum]>; } //# sourceMappingURL=logCounter.d.ts.map