/** * Barnes-Hut Force-Directed Layout * O(n log n) complexity using QuadTree spatial decomposition */ import { DocumentGraph } from "./graph-builder"; export interface LayoutOptions { width: number; height: number; iterations?: number; repulsionStrength?: number; attractionStrength?: number; theta?: number; damping?: number; initialAlpha?: number; alphaDecay?: number; minAlpha?: number; } export declare class BarnesHutLayout { private graph; private options; private alpha; constructor(graph: DocumentGraph, options: LayoutOptions); /** * Run the layout simulation */ simulate(onProgress?: (iteration: number, alpha: number) => void): void; /** * Single simulation step */ private step; /** * Build QuadTree from current node positions */ private buildQuadTree; /** * Reset simulation with new initial temperature */ reset(alpha?: number): void; /** * Get current alpha (temperature) */ getAlpha(): number; /** * Update layout bounds (for responsive resize) */ updateBounds(width: number, height: number): void; }