@shumoku/core · 0.4.0 · function
computeRoleDrivenRanks
Role-driven depth rank, robust to UNDIRECTED inventory cables (NetBox/Zabbix arrow:none). Direction can't be trusted, so the root is chosen by role + structure (the most peripheral boundary device = WAN edge) and depth is the BFS distance over the undirected graph — not raw link from→to (which makes a node whose cable happens to point "outward" a false source, e.g. a server at the top). High fan-out / thin-link sinks are not traversed through; a second pass reaches nodes that sit behind them.
computeRoleDrivenRanks(graph: NetworkGraph, sinks?: ReadonlySet<string>): Map<string, number> Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
graph | NetworkGraph | No additional description. | — |
sinks | ReadonlySet<string> | No additional description. | ... |
Returns
Map<string, number>