blob: cb45d255ac2a532609d2c2f3ac899dc1981df7c1 [file] [log] [blame]
// Copyright ©2015 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gen
import ""
// GraphBuilder is a graph that can have nodes and edges added.
type GraphBuilder interface {
HasEdgeBetween(xid, yid int64) bool
type DirectedBuilder interface {
HasEdgeFromTo(x, y graph.Node) bool
type DirectedMutator interface {
Edge(from, to graph.Node) graph.Edge
From(graph.Node) []graph.Node
Nodes() []graph.Node
To(graph.Node) []graph.Node
func abs(a int) int {
if a < 0 {
return -a
return a