Shumoku Docs

Search documentation

Shared docs and current release

Loading search…

日本語

@shumoku/core · 0.4.0 · function

computeRoleDrivenRanks

Source

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>

libs/@shumoku/core/src/layout/problem.ts:382