No description
Find a file
2025-09-09 10:01:38 -04:00
tests Silence (bogus) unused warning. 2023-01-15 11:55:07 -05:00
util Add include cligen/mergeCfgEnv to interpret env/user configs. 2024-10-28 09:09:28 -04:00
gaLP.nim Clean up 80-column violation discovered after futzing with 2025-07-27 15:39:07 -04:00
gaPrioQ.nim Add a bit more functionality to this little priorityQ for graph algos. 2024-02-03 08:40:13 -05:00
grAlg.nim Aligned & maybe better comments. 2022-10-24 15:26:42 -04:00
grAlg.nimble Bump versions pre-release 2025-09-09 10:01:38 -04:00
LICENSE Initial commit 2022-08-01 15:31:44 -04:00
README.md Update as per MST addition. 2022-08-05 13:34:59 -04:00

This is a small collection of classical graph algorithms on digraphs in Nim.

The core abstractions representing a graph are some kind of not necessarily dense integer-like address space, some nodes iterator on the graph and some edges(graph, node) iterator on the kids of a node/destinations of arcs.

It also contains (also at the top level) gaPrioQ.nim since the shortest path algorithm made famous by Dijkstra needs a priority queue that can efficiently edit entry priorities and std/heapqueue does not allow this.

https://github.com/c-blake/thes has demos/tests of most of these algorithms, but a quick list is:

  • arc/edge reversal
  • topological sorting/testing for DAG/cyclicity
  • transitive closure
  • shortest path from beginning to end via BFS
  • shortest path from beginning to end via Dijkstra
  • components when viewed as an undirected graph
  • min cost spanning tree of weighted, undirected graph

Should probably grow Max Flow, and weak strong components algorithms.