import "git.fractalqb.de/fractalqb/groph"
A pure Go library of graphs and their algorithms.
The library is currently rewritten for Go generics.
- Adjacency matrix: Uses a continuous region of memory, i.e. a slice
- Adjacency list: Uses a slice of slices
- Edgelist: A slice of {u, v, w}
- Euclidean: Computes the euclidean distance as weight for each edge where vertices have to implement the Distancer interface
- Forest: A compact representation for trees and forests
- Floyd Warshall for shortest paths
- Dijkstra's Algorithm for shortest paths
- A greedy implementation for the TSP
- A 2-opt based implementation for the TSP
- A* algorithm for undirected graphs