code wiki / _hdl_build / nx_viz_force.nx

nx_viz_force.nx

buildroot/runtime/_hdl_build/nx_viz_force.nx

3904 B91 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind tooltopic viz
docsdependenciesstructsconstsfunctions

about

nx_viz_force.nx -- the FORCE layer of the sovereign Nishi viz library (the d3-force equivalent, bits-up). Fruchterman-Reingold force-directed graph layout, pure integer/fixed-point: repulsion between ALL node pairs (k^2/d), attraction along edges (d^2/k), temperature cooling. Mutates xs/ys in place; DETERMINISTIC (no RNG). Turns node+edge data (genealogy / WMS streams / memory link-graph) into a laid-out graph. k = ideal edge length = isqrt(W*H/n). Closes layout-force. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_viz_trig.nx nx_syscalls.nx nx_viz_force.nx nx_viz_force_gate.nx nx_viz_graph.nx

imports: nx_viz_trig.nxnx_syscalls.nx

imported by: nx_viz_force_gate.nxnx_viz_graph.nx

structs

none

consts

8const K_MAGIC_32768: i64 = 32768
9const K_MAGIC_100000000: i64 = 100000000

functions

14func vf_layout(n: i64, xs: *i64, ys: *i64, m: i64, ea: *i64, eb: *i64, W: i64, H: i64, iters: i64, grav: i64) -> i64
called by 2: mainmain calls 2: vs_isqrtsys_mmap
91func main() -> i64 { return 0 }