Expand description
Fruchterman-Reingold force-directed graph layout.
O(n²) per iteration — acceptable for MVP with ≤2000 nodes. Runs a few steps per frame; pinned nodes are excluded from displacement.
Structs§
- Layout
Config - Configuration for the layout algorithm.
Functions§
- center_
graph - Center the graph at the origin after layout has converged.
- layout_
batch - Run multiple layout steps (for per-frame batch).
- layout_
step - Run one iteration of Fruchterman-Reingold layout.
- reset_
temperature - Reset layout: randomize positions and set temperature.