Typesafe equality test.
Typesafe equality test.
In order to be considered equal, two trees must have the same number of entries, and each entry found in one should be found in the other.
Return whether or not the given entry exists in the tree.
Return whether or not the value exists in the tree at (x, y).
Return a count of all entries found in the given search space.
Return an iterator over all entries in the tree.
Universal equality test.
Universal equality test.
Trees can only be equal to other trees. Unlike some other containers, the trees must be parameterized on the same type, or else the comparison will fail.
This means comparing an RTree[Int] and an RTree[BigInt] will always return false.
Construct a result an initial value, the entries found in a
search space, and a binary function f
.
Construct a result an initial value, the entries found in a
search space, and a binary function f
.
rtree.foldSearch(space, init)(f)
is equivalent to (but more efficient than):
rtree.search(space).foldLeft(init)(f)
Universal hash code method.
Universal hash code method.
Insert an entry into the tree, returning a new tree.
Insert a value into the tree at (x, y), returning a new tree.
Insert entries into the tree, returning a new tree.
Map the entry values from A to B.
Return a sequence of all entries found in the given search space.
Return a sequence of all entries found in the given search space.
Return a nice depiction of the tree.
Return a nice depiction of the tree.
This method should only be called on small-ish trees! It will print one line for every branch, leaf, and entry, so for a tree with thousands of entries this will result in a very large string!
Remove an entry from the tree, returning a new tree.
Remove an entry from the tree, returning a new tree.
If the entry was not present, the tree is simply returned.
Remove entries from the tree, returning a new tree.
Return a sequence of all entries found in the given search space.
Return a sequence of all entries found in the given search space.
Return a sequence of all entries intersecting the given search space.
Return a sequence of all entries intersecting the given search space.
Return an iterator over all values in the tree.
This is the magnificent RTree, which makes searching ad-hoc geographic data fast and fun.
The RTree wraps a node called 'root' that is the actual root of the tree structure. RTree also keeps track of the total size of the tree (something that individual nodes don't do).