graph: imported graph as a subtree

This commit is contained in:
Brendan Tracey
2017-05-23 00:02:59 -06:00
158 changed files with 36849 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// Copyright ©2014 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.
//+build appengine
package set
import "reflect"
// same determines whether two sets are backed by the same store. In the
// current implementation using hash maps it makes use of the fact that
// hash maps are passed as a pointer to a runtime Hmap struct. A map is
// not seen by the runtime as a pointer though, so we use reflect to get
// the maps' pointer values to compare.
func same(a, b Nodes) bool {
return reflect.ValueOf(a).Pointer() == reflect.ValueOf(b).Pointer()
}