graph: use int64 for node retrieval

This commit is contained in:
Dan Kortschak
2018-03-24 09:21:44 +10:30
committed by GitHub
parent f0b07f8621
commit 6b03bc22e1
93 changed files with 1174 additions and 1116 deletions

View File

@@ -273,8 +273,8 @@ func same(a, b graph.Graph) bool {
}
}
for _, u := range a.Nodes() {
aFromU := a.From(u)
bFromU := b.From(u)
aFromU := a.From(u.ID())
bFromU := b.From(u.ID())
if len(aFromU) != len(bFromU) {
return false
}
@@ -288,7 +288,7 @@ func same(a, b graph.Graph) bool {
aW, aWok := a.(graph.Weighted)
bW, bWok := b.(graph.Weighted)
if aWok && bWok {
if aW.WeightedEdge(u, va).Weight() != bW.WeightedEdge(u, vb).Weight() {
if aW.WeightedEdge(u.ID(), va.ID()).Weight() != bW.WeightedEdge(u.ID(), vb.ID()).Weight() {
return false
}
}