[−][src]Module algorithms_edu::algo::graph
Graph Theory Algorithms
This module contains implementations of graph and tree representations and algorithms.
I highly recommend watching William Fiset's video series on graph theory algorithms While following along, try implementing the algorithms yourself before comparing them to implementations presented here or William's original Java implementations.
Modules
bfs | Breadth First Search |
bipartite_check | This mod shows you how to determine if a graph is bipartite or not. This can be achieved in linear time by coloring the visited nodes. |
dfs | |
eulerian_path | Implementation of finding an Eulerian Path on a graph. This implementation verifies that the input graph is fully connected and supports self loops and repeated edges between nodes. |
minimum_spanning_tree | |
network_flow | |
shortest_path | |
tarjan_scc | An implementation of Tarjan's Strongly Connected Components algorithm using an adjacency list. |
topological_sort | Topological Sort |
tree | This module contains tree representations and related algorithms. |
Structs
Edge | The Edge type used in |
UnweightedAdjacencyList | An unweighted graph represented by an unweighted adjacency list.
This is in principle the same as |
WeightedAdjacencyList | A graph represented by a weighted adjacency list.
Under the hood, a weighted adjacency list is a |
WeightedAdjacencyMatrix | Dense graphs, are sometimes more efficient to be represented as adjacency matrices.
A |
WeightedUndirectedAdjacencyMatrixCondensed | An adjacency matrix representing an undirected graph is symmetric with respect to the main diagonal,
i.e. |