Files
gonum/graph
Dan Kortschak 4536514e9f graph/coloring: add DIMACS queen test graphs
The graphs were obtained from https://mat.tepper.cmu.edu/COLOR/instances.html
and converted to graph6 using the following code:

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"

	"gonum.org/v1/gonum/graph/encoding/graph6"
	"gonum.org/v1/gonum/graph/simple"
)

func main() {
	g := simple.NewUndirectedGraph()
	sc := bufio.NewScanner(os.Stdin)
	for sc.Scan() {
		line := sc.Text()
		if len(line) == 0 || line[0] != 'e' {
			continue
		}
		f := strings.Fields(line)
		g.SetEdge(simple.Edge{F: node(f[1]), T: node(f[2])})
	}
	fmt.Printf("%q\n", graph6.Encode(g))
}

func node(s string) simple.Node {
	i, err := strconv.Atoi(s)
	if err != nil {
		panic(err)
	}
	return simple.Node(i)
}

To convert graphs (ASCII col format only), use `go run main.go < <input>.col'.
2022-01-20 17:30:35 +10:30
..
2021-11-02 05:56:02 +10:30
2017-05-23 00:02:59 -06:00
2017-07-10 07:03:44 +09:30

Gonum graph GoDoc

This is a generalized graph package for the Go language.