/**
 * Mutable community assignment with per-community aggregates.
 * Vendored from ngraph.leiden (MIT) — no external dependencies.
 *
 * Maintains per-community totals and per-move scratch accumulators so we can
 * compute modularity/CPM gains in O(neighborhood) time without rescanning the
 * whole graph after each move.
 */
import type { GraphAdapter } from './adapter.js';
export interface CompactOptions {
    keepOldOrder?: boolean;
    preserveMap?: Map<number, number>;
}
export interface Partition {
    n: number;
    readonly communityCount: number;
    nodeCommunity: Int32Array;
    readonly communityTotalSize: Float64Array;
    readonly communityNodeCount: Int32Array;
    readonly communityInternalEdgeWeight: Float64Array;
    readonly communityTotalStrength: Float64Array;
    readonly communityTotalOutStrength: Float64Array;
    readonly communityTotalInStrength: Float64Array;
    resizeCommunities(newCount: number): void;
    initializeAggregates(): void;
    accumulateNeighborCommunityEdgeWeights(v: number): number;
    getCandidateCommunityCount(): number;
    getCandidateCommunityAt(i: number): number;
    getNeighborEdgeWeightToCommunity(c: number): number;
    getOutEdgeWeightToCommunity(c: number): number;
    getInEdgeWeightFromCommunity(c: number): number;
    deltaModularityUndirected(v: number, newC: number, gamma?: number): number;
    deltaModularityDirected(v: number, newC: number, gamma?: number): number;
    deltaCPM(v: number, newC: number, gamma?: number): number;
    moveNodeToCommunity(v: number, newC: number): boolean;
    compactCommunityIds(opts?: CompactOptions): void;
    getCommunityMembers(): number[][];
    getCommunityTotalSize(c: number): number;
    getCommunityNodeCount(c: number): number;
    /** Attached by optimiser after creation — undefined until set. */
    graph?: GraphAdapter;
}
export declare function makePartition(graph: GraphAdapter): Partition;
//# sourceMappingURL=partition.d.ts.map