VEZY / MultiScaleTreeGraph.jl

Read, analyse, compute, write and convert MTG files
https://vezy.github.io/MultiScaleTreeGraph.jl/stable
MIT License
10 stars 1 forks source link

Make the return of `traverse` optionnally type aware #59

Closed VEZY closed 7 months ago

VEZY commented 7 months ago

When we traverse the mtg (non-mutating version), we often already now what type of data our function will return. This could be given by the user as an argument so we could create a vector with this type instead of Any[].

VEZY commented 7 months ago

We could also get the type automatically in the same fashion that comprehension / broadcasting / mapping does. See this discussion: https://stackoverflow.com/questions/38285243/manual-type-inference-in-julia

But probably the best is to ask to the user, as they would know better.

VEZY commented 7 months ago

Note: update the functions that does use it, e.g. list_nodesor get_attributes.