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'.