graph: move NewEdge method from encoding.Builder to graph.EdgeAdder

Also rename graph.EdgeSetter to graph.EdgeAdder.

Fixes #56.
This commit is contained in:
mewmew
2017-08-18 03:51:30 +02:00
parent a1f42c86ac
commit 0ebdd59ba5
8 changed files with 59 additions and 63 deletions

View File

@@ -11,9 +11,6 @@ import "gonum.org/v1/gonum/graph"
type Builder interface {
graph.Graph
graph.Builder
// NewEdge adds a new edge from the source to the destination node to the
// graph, or returns the existing edge if already present.
NewEdge(from, to graph.Node) graph.Edge
}
// AttributeSetter is implemented by types that can set an encoded graph