sfa.topology module¶
-
sfa.topology.
splo
(nxdg, sources, outputs, rtype='df')[source]¶ Calculate the shortest path length from each source node to the outputs. SPLO represents ‘shortest path length to output’.
- Parameters
- nxdg: NetworkX.DiGraph
A directed network in NetworkX.
- sources: list (or iterable) of str
Names of source nodes in nxdg.
- outputs: list (or iterable) of str
Names of output nodes in nxdg.
- rtype: str (optional)
Return object type: ‘df’ or ‘dict’.
- Returns
- splo: dict
All the shortest path lengths to the outputs.