dijkstra_shortest_path
DijkstraShortestPath
Bases: NKAlgorithm
An algorithm using the networkit implementation of Dijkstra's algorithm to find the shortest path between two nodes.
source = source
instance-attribute
target = target
instance-attribute
__init__(graph, source, target)
run()
Compute the shortest path between the source and target node of the given graph.
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray[path_length]: Nodes of the shortest path between the source and target. |