graph/graphs/gen: simplify interface requirements
MODIFY
graph/graphs/gen/batagelj_brandes.go
graph/graphs/gen/batagelj_brandes.go
@@ -20,7 +20,7 @@ import (
// between nodes are formed with the probability, p. If src is not nil it is used
// as the random source, otherwise rand.Float64 is used. The graph is constructed
// in O(n+m) time where m is the number of edges added.
-func Gnp(dst GraphBuilder, n int, p float64, src rand.Source) error {
+func Gnp(dst graph.Builder, n int, p float64, src rand.Source) error {
if p == 0 {
for i := 0; i < n; i++ {
dst.AddNode(dst.NewNode())

MODIFY
graph/graphs/gen/gen.go
graph/graphs/gen/gen.go
@@ -8,7 +8,6 @@ import "gonum.org/v1/gonum/graph"
// GraphBuilder is a graph that can have nodes and edges added.
type GraphBuilder interface {
- Node(id int64) graph.Node
HasEdgeBetween(xid, yid int64) bool
graph.Builder
}

graph/graphs/gen: simplify interface requirements