Fork me on GitHub

Graph algorithms, in pure Go.
What gonum lacks, and nothing it already has.

go-graphalgo is planned (wave 3 of the go-scikit roadmap): matching, isomorphism, cut extraction, the centralities gonum lacks and a MATLAB-style graph/digraph facade over gonum/graph, validated against NetworkX. No repository holds code yet.

planned (wave 3)1 packages in the planCGO=0 pure Go
status
status    planned (wave 3)
package   graph (wave 3)
plan      github.com/go-scikit/roadmap
2 repositories โ€” no library yet: planned, wave 3
What it will cover

Scope: graph algorithms.

Nothing here is released. This is the scope of the plan, as PLAN.md states it: item 16 of wave 3 (go-graphalgo: matching, isomorphism, communities, the centralities gonum lacks; gonum/graph already has max flow and betweenness, so they are reused and not rewritten).

โ‡„

Matching

Hopcroft-Karp for bipartite graphs and Edmonds' blossom algorithm for general graphs: gonum has neither.

โ‰…

Isomorphism

VF2 for matching subgraphs and a canonical labelling after nauty for canonical forms.

โœ‚

Cuts and flows

Minimum-cut extraction from gonum's Dinic maximum flow, and push-relabel only if it is needed.

โ˜…

Centralities

The ones gonum lacks; Brandes betweenness, PageRank and HITS are already there and are reused.

๐Ÿงฉ

A MATLAB-style facade

graph, digraph, adjacency, incidence and Laplacian matrices over gonum/graph, which already covers the structures.

โš–๏ธ

Licences kept clean

NetworkX (BSD-3-Clause) is the oracle; the igraph C core (GPL-2.0) is an oracle only.

What will be checked

3 kinds of check, each against the reference tool of the domain.

Every item of the plan is validated against the tools that are the reference in its domain, driven as oracles from Go. These are plans, taken from the roadmap's bibliography; no result exists yet.

Exact equality on integer problems

Integer-weight shortest paths, flow values, matching sizes and component partitions equal NetworkX’s. (planned)

Communities by modularity

Louvain and Leiden are not deterministic: the seed is fixed and modularity is compared within a tolerance, not labels. (planned)

Public corpora

SNAP graphs and the DIMACS implementation-challenge instances for flows, matching and shortest paths. (planned)

Repositories and packages

What is here, and what is planned.

docs

site

The documentation (Hugo + Hextra): the scope, the plan and one page per planned package, with its references. Source โ†’

brand

assets

Logos and icons for the organization, in SVG / PNG / JPG / ICO / ICNS across colour, white and black variants.

graph

planned (wave 3)

Graph algorithms that gonum/graph lacks, behind a MATLAB-style graph and digraph facade. No repository yet; the name is a working name.

Planned, in the open.

The plan and its progress are public: PLAN.md says what each domain covers and in which wave, STATUS.md says where each item stands. The documentation describes the planned packages and the references they will be validated against.

See the organization on GitHub โ†’