Network.shortest_path

Network.shortest_path(u, v)[source]

Find the shortest path between two nodes using the A* algorithm.

Parameters:
uhashable

The identifier of the start node.

vhashable

The identifier of the end node.

Returns:
list[hashable] | None

The path from root to goal, or None, if no path exists between the vertices.

See also

compas.topology.astar_shortest_path()