FormDiagram.shortest_path

FormDiagram.shortest_path(start, end)[source]

Find the shortest path between two nodes of the network.

Parameters:
  • network (Network) – A network data structure.

  • start (hashable) – The identifier of the start node.

  • end (hashable) – The identifier of the end node.

Returns:

list[hashable] – The nodes of the network leading from start to end.