Skip to content

subpop/go-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PkgGoDev Go Report Card

Another graph package in Go.

Features

Graph Construction

  • Generic type support for vertex types
  • Directed and undirected graphs
  • Weighted edges
  • Add/remove vertices and edges
  • Cycle detection

Shortest Path Algorithms

  • Dijkstra (non-negative weights)
  • Bellman-Ford (handles negative weights, detects negative cycles)
  • Floyd-Warshall (all-pairs shortest paths)
  • A* (heuristic-based pathfinding)
  • BFS shortest path (unweighted graphs)

Minimum Spanning Trees

  • Kruskal's algorithm
  • Prim's algorithm

Graph Algorithms

  • Topological sort (for DAGs)
  • Connected components detection
  • Neighborhood queries with distance filters

Graph Traversal

  • Depth-first search (DFS)
  • Breadth-first search (BFS)
  • Visitor pattern support for custom traversal logic

About

basic graphs in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages