/**
 * A single centroid in the t-digest.
 */
export interface Centroid {
    mean: number;
    weight: number;
}
/**
 * A serializable t-digest representation.
 */
export interface ToolDigest {
    count: number;
    centroids: Centroid[];
}
/**
 * Create an empty t-digest.
 */
export declare function emptyDigest(): ToolDigest;
/**
 * Merge a single sample into an existing digest.
 * Uses the simple sorted-centroid merge algorithm.
 * Returns a new digest (immutable).
 */
export declare function mergeDigest(digest: ToolDigest, sample: number): ToolDigest;
/**
 * Compute the quantile q (0..1) from the digest.
 * Returns the estimated value at quantile q.
 * For empty digest, returns 0.
 */
export declare function quantile(digest: ToolDigest, q: number): number;
/**
 * Serialize a digest to a Buffer (JSON-encoded for portability).
 */
export declare function serializeDigest(digest: ToolDigest): Buffer;
/**
 * Deserialize a digest from a Buffer.
 */
export declare function deserializeDigest(buf: Buffer): ToolDigest;
//# sourceMappingURL=tdigest.d.ts.map