Skip to main content

Module orderings

Module orderings 

Source
Available on crate feature layout only.
Expand description

Ordering providers for babylon’s topology render lane (design canon S9): surfaces consume orderings, never force layouts. paoh_ordering mirrors src/babylon/projection/topology/paoh.py’s SHAPE (nodes, sorted edges) — with one declared deviation: node order here is insertion order (III.7 determinism via node_ids()), not paoh.py’s lexicographic sorted(set); callers wanting the lexicographic view sort the returned vec. Edge sort-by-attr-with-missing-last matches paoh.py exactly. levi_ego_tree mirrors levi.py, modeled on this crate’s own bipartite (agent/hyperedge) representation. Both are re-expressions of existing structure — no new mathematics.

Structs§

LeviNode
A node in the Levi ego-tree: an agent or a hyperedge, with children in membership insertion order.

Enums§

LeviKind
The kind of node represented by a LeviNode in the Levi (bipartite) ego-tree walk.

Functions§

levi_ego_tree
Build a breadth-limited bipartite ego-tree rooted at root (an agent id). depth counts hyperedge expansions: at depth == 0 the root is returned with no children. Each agent/hyperedge is visited at most once (a HashSet<String> guard per kind — Power-of-10 rule 2: the walk is bounded by the hypergraph’s finite node/edge count, so it always terminates). Returns None if root does not exist.
paoh_ordering
PAOH ordering (parallel aggregated ordered hypergraph): nodes in insertion order; edges in insertion order unless sort_attr names a numeric edge attribute, in which case edges are stable-sorted ascending by that attr’s as_f64() value, with missing/non-numeric attrs sorted LAST (ties by insertion order) — matches babylon’s paoh.py None-last rule.