pathsim.utils.utils module
- pathsim.utils.utils.path_length_dfs(connections, starting_block, visited=None)[source]
Recursively compute the longest path (depth first search) in a directed graph from a starting node / block.
- Parameters:
connections (list[Connection]) – connections of the graph
starting_block (Block) – block to start dfs
visited (None, set) – set of already visited graph nodes (blocks)
- Returns:
length – length of path starting from ´starting_block´
- Return type: