Skip to main content

Module spring

Module spring 

Source
Available on crate feature layout only.
Expand description

Fruchterman–Reingold spring layout on the 1-skeleton, plus the hyperedge-aware variant. Hand-rolled (no rustworkx-core layout exists) and seeded by rand_pcg::Pcg64Mcg for Constitution III.7 determinism.

Functions§

hyperedge_aware_layout
Hyperedge-aware layout: FR agent positions (seeded at DEFAULT_LAYOUT_SEED), each hyperedge rendered as the halo_padding-expanded convex hull of its members. halo_padding corresponds to XGI’s halo “radius margin” (draw.py:199-200, default 0.05).
spring_layout
Spring layout: FR positions for agents; each hyperedge is a Spline through its members’ positions, in members() traversal order (deterministic petgraph adjacency order — NOT insertion order; only node_ids()/ edge_ids() are true insertion order, see Phase 0+1 members()). seed = None uses DEFAULT_LAYOUT_SEED.