github.com/jingcheng-WU/gonum@v0.9.1-0.20210323123734-f1a2a11a8f7b/graph/graphs/gen/gen.go (about) 1 // Copyright ©2015 The Gonum Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package gen 6 7 import "github.com/jingcheng-WU/gonum/graph" 8 9 // GraphBuilder is a graph that can have nodes and edges added. 10 type GraphBuilder interface { 11 HasEdgeBetween(xid, yid int64) bool 12 graph.Builder 13 } 14 15 func abs(a int) int { 16 if a < 0 { 17 return -a 18 } 19 return a 20 }