/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { RedBlackTree } from "./collections";
import { CollaborationWindow, IMergeBlock, MergeTree } from "./mergeTree";
interface IOverlapClient {
    clientId: number;
    seglen: number;
}
export interface PartialSequenceLength {
    seq: number;
    len: number;
    seglen: number;
    clientId?: number;
    overlapRemoveClients?: RedBlackTree<number, IOverlapClient>;
}
/**
 * Keep track of partial sums of segment lengths for all sequence numbers
 * in the current collaboration window (if any).  Only used during active
 * collaboration.
 */
export declare class PartialSequenceLengths {
    minSeq: number;
    static options: {
        verify: boolean;
        zamboni: boolean;
    };
    static combine(mergeTree: MergeTree, block: IMergeBlock, collabWindow: CollaborationWindow, recur?: boolean): PartialSequenceLengths;
    /**
     * Combine the partial lengths of block's children
     * @param block - an interior node; it is assumed that each interior node child of this block
     * has its partials up to date
     * @param collabWindow - segment window of the segment tree containing textSegmentBlock
     */
    private static combineBranch;
    private static fromLeaves;
    private static getOverlapClients;
    private static accumulateRemoveClientOverlap;
    private static insertSegment;
    private static addSeq;
    minLength: number;
    segmentCount: number;
    partialLengths: PartialSequenceLength[];
    clientSeqNumbers: PartialSequenceLength[][];
    constructor(minSeq: number);
    update(mergeTree: MergeTree, node: IMergeBlock, seq: number, clientId: number, collabWindow: CollaborationWindow): void;
    getPartialLength(refSeq: number, clientId: number): number;
    toString(glc?: (id: number) => string, indentCount?: number): string;
    private zamboni;
    private addClientSeqNumber;
    private addClientSeqNumberFromPartial;
    private cliLatestLEQ;
    private cliLatest;
    private verifyPartialLengths;
    private verify;
}
export {};
//# sourceMappingURL=partialLengths.d.ts.map