You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I coded up a brief implementation of the AbstractTrees.jl interface here:
using AbstractTrees
import SpatialIndexing as SI
AbstractTrees.children(node::SI.Branch) = SI.children(node)
AbstractTrees.nodevalue(node::SI.Branch) = SI.mbr(node)
AbstractTrees.children(node::T) where {T <:SI.Leaf} = T[]
AbstractTrees.nodevalue(node::SI.Leaf) = leaf.children
AbstractTrees.ParentLinks(::Type{<: SI.Node}) = AbstractTrees.ImplicitParents()
AbstractTrees.SiblingLinks(::Type{<: SI.Node}) = AbstractTrees.ImplicitSiblings()
AbstractTrees.ChildIndexing(::Type{<: SI.Node}) = AbstractTrees.IndexedChildren()
AbstractTrees.NodeType(::Type{<:SI.Node{T,N,V}}) where {T,N,V} = SI.Node{T, N, V}
This provides iterators like DFS (post and pre ordered), BFS, and leaf iterators.
Would there be interest in a PR adding this + tests to the package? I am currently working on a problem that requires me to depth-first search down R-trees that partition geometries.
I coded up a brief implementation of the AbstractTrees.jl interface here:
This provides iterators like DFS (post and pre ordered), BFS, and leaf iterators.
Would there be interest in a PR adding this + tests to the package? I am currently working on a problem that requires me to depth-first search down R-trees that partition geometries.
Let me know what you think @alyst!
The text was updated successfully, but these errors were encountered: