Skip to content

Commit 3497894

Browse files
committed
add isspatialtree to NaturalIndexing
1 parent 81ef5b1 commit 3497894

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/NaturalIndexing.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ Extents.extent(node::NaturalTreeNode) = node.extent
152152
# - `isleaf(node)` returns a boolean indicating whether the node is a leaf
153153
# - `child_indices_extents(node)` returns an iterator over the indices and extents of the children of the node
154154

155+
SpatialTreeInterface.isspatialtree(::Type{<: NaturalIndexing}) = true
156+
SpatialTreeInterface.isspatialtree(::Type{<: NaturalTreeNode}) = true
157+
155158
function SpatialTreeInterface.nchild(node::NaturalTreeNode)
156159
start_idx = (node.index - 1) * node.parent_index.nodecapacity + 1
157160
stop_idx = min(start_idx + node.parent_index.nodecapacity - 1, length(node.parent_index.levels[node.level+1].extents))

0 commit comments

Comments
 (0)