Module shortest_path

Source
Expand description

Module for shortest path algorithms.

This module contains functions for various algorithms that compute the shortest path of a graph.

Functions§

all_shortest_paths
Dijkstra-based all shortest paths algorithm.
astar
A* shortest path algorithm.
bellman_ford
Bellman-Ford shortest path algorithm with the SPFA heuristic.
dijkstra
Dijkstra’s shortest path algorithm.
k_shortest_path
k’th shortest path algorithm.
negative_cycle_finder
Finds an arbitrary negative cycle in a graph using the Bellman-Ford algorithm with the SPFA heuristic.