Graphs.jl icon indicating copy to clipboard operation
Graphs.jl copied to clipboard

Feature Request: Iterator for Graph Traversal

Open kylebeggs opened this issue 3 years ago • 2 comments

For some algorithms, it is needed to visit each node and perhaps do some work there and then move on, in other words iterate through them. I implemented this myself (although a rough approach) so I just wanted to open an issue and see if this would be a welcomed addition before I clean up my code and adhere to the contribution guidelines / style.

An example of a need for this is orienting normals on a surface, see Surface Reconstruction from Unorganized Points section 3.3.

kylebeggs avatar Feb 16 '22 23:02 kylebeggs

Hy @kylebeggs! This is a great idea, and we had been talking about this for a while. There is some related code in https://github.com/JuliaGraphs/Graphs.jl/tree/master/src/Experimental/Traversals, but it is not yet operational. Do you maybe want to take a look and open a PR?

gdalle avatar Mar 10 '22 08:03 gdalle

Hi @gdalle, yes I will take a look and use what is there already as building blocks. Will probably start working on this in a few weeks as I'm pretty busy right now. Adding to my to-do list.

kylebeggs avatar Mar 10 '22 16:03 kylebeggs