We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following tree has a single "root" and 5 children attached to that root. I expected the depth to be 2.
BFSWithDepth increments and passes "depth" to the visit function with values as high as 6.
For this case, it increments depth for the root and again for each child attached to the root as it loops through the adjancency graph.
resourceHash := func(r Resource) string { return r.Name() }
s.tree = graph.New(resourceHash, graph.Tree(), graph.Directed(), graph.PreventCycles()) s.tree.AddVertex(NullResource{"root"}) s.tree.AddVertex(NullResource{"A"}) s.tree.AddVertex(NullResource{"B"}) s.tree.AddVertex(NullResource{"C"}) s.tree.AddVertex(NullResource{"D"}) s.tree.AddVertex(NullResource{"E"}) s.tree.AddEdge("root", "A") s.tree.AddEdge("root", "B") s.tree.AddEdge("root", "C") s.tree.AddEdge("root", "D") s.tree.AddEdge("root", "E")
The text was updated successfully, but these errors were encountered:
Using version 0.23.0 (latest) It seems like it is returning "width + 1" instead of "depth".
Sorry, something went wrong.
+1 to this 🤕
First of all, sorry for the late response – I'm going to review #153 today.
No branches or pull requests
The following tree has a single "root" and 5 children attached to that root.
I expected the depth to be 2.
BFSWithDepth increments and passes "depth" to the visit function with values as high as 6.
For this case, it increments depth for the root and again for each child attached to the root as it loops through the adjancency graph.
resourceHash := func(r Resource) string {
return r.Name()
}
The text was updated successfully, but these errors were encountered: