Expand description
Graph algorithms on weighted, directed or undirected graphs with vertices 0..n.
See the book entry Graph algorithms.
Re-exports§
pub use all_pairs::AllPairsShortestPaths;pub use all_pairs::floyd_warshall;pub use all_pairs::johnson;pub use k_shortest::yen;pub use matching::BipartiteMatching;pub use matching::maximum_bipartite_matching;pub use matching::min_weight_full_bipartite_matching;pub use matching::structural_rank;pub use laplacian::laplacian;pub use graph::Edge;pub use graph::Graph;pub use graph::UnionFind;pub use max_flow::FlowNetwork;pub use max_flow::MaxFlow;pub use ordering::condensation;pub use ordering::strongly_connected_components;pub use ordering::topological_sort;pub use shortest_paths::ShortestPaths;pub use shortest_paths::a_star;pub use shortest_paths::bellman_ford;pub use shortest_paths::dijkstra;pub use spanning_trees::SpanningForest;pub use spanning_trees::kruskal;pub use spanning_trees::prim;
Modules§
- all_
pairs - All-pairs shortest paths by the Floyd-Warshall algorithm and by Johnson’s algorithm.
- graph
- Graph representation: adjacency lists with conversions to edge lists and matrices, traversal, connected components and a disjoint-set (union-find) structure.
- k_
shortest - The
Kshortest loopless paths between two vertices by Yen’s algorithm (SciPy’syen). - laplacian
- Graph Laplacians (SciPy’s
scipy.sparse.csgraph.laplacian). - matching
- Matchings in bipartite graphs, following
scipy.sparse.csgraph: maximum-cardinality matching by Hopcroft and Karp (maximum_bipartite_matching), minimum-weight full matching by successive shortest augmenting paths (min_weight_full_bipartite_matching), and the structural rank of a sparsity pattern (structural_rank). - max_
flow - Maximum flow and minimum cut: Edmonds-Karp and Dinic.
- ordering
- Topological sorting and strongly connected components of directed graphs.
- shortest_
paths - Single-source shortest paths: Dijkstra, Bellman-Ford and A*.
- spanning_
trees - Minimum spanning trees (forests) of undirected graphs: Kruskal and Prim.