traverse<R> method

Iterable<R> traverse<R>(
  1. Map1<RTreeNode<T>, Iterable<R>> callback, {
  2. Predicate1<RTreeNode<T>>? condition,
})

Traverses the nodes of the R-Tree in depth-first order, calling the given function on each node. A condition function may optionally be passed to filter which nodes get traversed. If condition returns False, then neither the node nor any of its descendants will be traversed.

Implementation

Iterable<R> traverse<R>(Map1<RTreeNode<T>, Iterable<R>> callback,
        {Predicate1<RTreeNode<T>>? condition}) =>
    root.traverse(callback, condition: condition);