- compas.topology.shortest_path(adjacency, root, goal)
Find the shortest path between two vertices of a network.
adjacency (dict) – An adjacency dictionary.
root (hashable) – The identifier of the starting node.
goal (hashable) – The identifier of the ending node.
list, None – The path from root to goal, or None, if no path exists between the vertices.