Created
May 3, 2022 03:18
-
-
Save sausheong/40fdb91ce548a59909210103fd28063a to your computer and use it in GitHub Desktop.
mst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (g *Graph) HasEdge(name string, edge *Edge) bool { | |
for _, e := range g.Edges[name] { | |
if e.node.name == edge.node.name && e.weight == edge.weight { | |
return true | |
} | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment