Skip to content

Instantly share code, notes, and snippets.

@sausheong
Created May 2, 2022 21:55
Show Gist options
  • Save sausheong/9ccfea06b76f854c868f293f12251d10 to your computer and use it in GitHub Desktop.
Save sausheong/9ccfea06b76f854c868f293f12251d10 to your computer and use it in GitHub Desktop.
mst
// check if a node is in a subgraph
func in(node *Node, subgraph *Subgraph) bool {
for _, n := range subgraph.nodes {
if n.name == node.name {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment