import { I as VisualGraph, f as Graph } from "../types-BAEQTwK_.mjs"; import { LayoutOptions } from "./index.mjs"; import { ForceAtlas2Settings } from "graphology-layout-forceatlas2"; //#region src/layout/forceatlas2.d.ts interface ForceAtlas2LayoutOptions extends LayoutOptions { /** Number of ForceAtlas2 iterations. Default: 100. */ iterations?: number; /** * Pass-through engine settings (`scalingRatio`, `gravity`, `linLogMode`, * `barnesHutOptimize`, …). See graphology-layout-forceatlas2. */ settings?: ForceAtlas2Settings; } /** * One-shot ForceAtlas2 layout via graphology (optional peer dependencies * `graphology` + `graphology-layout-forceatlas2`). Runs the synchronous * engine for `options.iterations` iterations and returns a positioned * {@link VisualGraph}. * * - Deterministic: FA2 itself has no randomness, but it requires initial * positions. Positioned nodes start from their current centers * (incremental relayout); unpositioned nodes start in a seeded scatter * driven by `options.seed` — the same seed always produces the same * layout. * - `options.isFixed` pins positioned nodes at their current `x`/`y` via * FA2's `fixed` node attribute (honored natively by the engine). * - Per-edge `weight` feeds FA2's attraction (its default edge-weight * getter reads the `weight` attribute; tune with * `settings.edgeWeightInfluence`). * - Self-loops are skipped (zero-distance edges destabilize the forces); * parallel edges are kept (multigraph). Hierarchy is ignored (force * layouts are flat). * * @example * ```ts * import { getForceAtlas2Layout } from '@statelyai/graph/layout/forceatlas2'; * * const laidOut = getForceAtlas2Layout(graph, { * seed: 42, * iterations: 200, * settings: { gravity: 2 }, * }); * ``` */ declare function getForceAtlas2Layout(graph: Graph | VisualGraph, options?: ForceAtlas2LayoutOptions): VisualGraph; //#endregion export { ForceAtlas2LayoutOptions, getForceAtlas2Layout };