nocad.viz.hierarchy_layout#

nocad.viz.hierarchy_layout(adj, direction='control', level_gap=1.25, node_gap=0.7, n_sweeps=12)[source]#

Layered layout of the condensation of a network.

Parameters:
adjnetwork
direction{“control”, “observation”}

"control": source components on top (level 0), edges point downward; "observation": sink components on the bottom level.

level_gap, node_gapfloat

Vertical distance of levels and horizontal distance of trivial components.

n_sweepsint

Barycenter sweeps for the order of the components on a level.

Returns:
layoutBunch with pos (N, 2), level (per component), center (p, 2),

radius (p,), condensation and levels (list of component lists).

Examples using nocad.viz.hierarchy_layout#

The SCC hierarchy: where inputs and outputs must go

The SCC hierarchy: where inputs and outputs must go