gonum.org/v1/gonum@v0.14.0/graph/network/network_test.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 network 6 7 const ( 8 A = iota 9 B 10 C 11 D 12 E 13 F 14 G 15 H 16 I 17 J 18 K 19 L 20 M 21 N 22 O 23 P 24 Q 25 R 26 S 27 T 28 U 29 V 30 W 31 X 32 Y 33 Z 34 ) 35 36 // set is an integer set. 37 type set map[int64]struct{} 38 39 func linksTo(i ...int64) set { 40 if len(i) == 0 { 41 return nil 42 } 43 s := make(set) 44 for _, v := range i { 45 s[v] = struct{}{} 46 } 47 return s 48 }