Skip to content

A pure Go library of graphs and their algorithms

License

Notifications You must be signed in to change notification settings

fractalqb/groph

Repository files navigation

groph

Build Status codecov Go Report Card GoDoc

import "git.fractalqb.de/fractalqb/groph"


A pure Go library of graphs and their algorithms.

The library is currently rewritten for Go generics.

Graph implementations:

  • 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

Algorithms

Computing Paths

  • 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

About

A pure Go library of graphs and their algorithms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages