.. _sphx_glr_api_gallery_graph_theory_shortest_paths: Shortest paths ---------------- Dijkstra, Bellman-Ford, and Floyd-Warshall. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /api/gallery/graph_theory/shortest_paths/images/thumb/sphx_glr_plot_01_dijkstra_vs_bellman_ford_thumb.png :alt: :doc:`/api/gallery/graph_theory/shortest_paths/plot_01_dijkstra_vs_bellman_ford` .. raw:: html
Dijkstra's shortest-path algorithm (and when Bellman-Ford is needed)
.. raw:: html
.. only:: html .. image:: /api/gallery/graph_theory/shortest_paths/images/thumb/sphx_glr_plot_02_floyd_warshall_thumb.png :alt: :doc:`/api/gallery/graph_theory/shortest_paths/plot_02_floyd_warshall` .. raw:: html
Floyd-Warshall: all-pairs shortest paths
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /api/gallery/graph_theory/shortest_paths/plot_01_dijkstra_vs_bellman_ford /api/gallery/graph_theory/shortest_paths/plot_02_floyd_warshall