Class/Object

archery

RTree

Related Docs: object RTree | package archery

Permalink

case class RTree[A](root: Node[A], size: Int) extends Product with Serializable

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).

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RTree
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RTree(root: Node[A], size: Int)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ===(that: RTree[A]): Boolean

    Permalink

    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.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contains(entry: Entry[A]): Boolean

    Permalink

    Return whether or not the given entry exists in the tree.

  8. def contains(x: Float, y: Float, value: A): Boolean

    Permalink

    Return whether or not the value exists in the tree at (x, y).

  9. def count(space: Box): Int

    Permalink

    Return a count of all entries found in the given search space.

  10. def entries: Iterator[Entry[A]]

    Permalink

    Return an iterator over all entries in the tree.

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(that: Any): Boolean

    Permalink

    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.

    Definition Classes
    RTree → Equals → AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def foldSearch[B](space: Box, init: B)(f: (B, Entry[A]) ⇒ B): B

    Permalink

    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)

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink

    Universal hash code method.

    Universal hash code method.

    Definition Classes
    RTree → AnyRef → Any
  17. def insert(entry: Entry[A]): RTree[A]

    Permalink

    Insert an entry into the tree, returning a new tree.

  18. def insert(x: Float, y: Float, value: A): RTree[A]

    Permalink

    Insert a value into the tree at (x, y), returning a new tree.

  19. def insertAll(entries: Iterable[Entry[A]]): RTree[A]

    Permalink

    Insert entries into the tree, returning a new tree.

  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def map[B](f: (A) ⇒ B): RTree[B]

    Permalink

    Map the entry values from A to B.

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def nearest(pt: Point): Option[Entry[A]]

    Permalink

    Return a sequence of all entries found in the given search space.

  24. def nearestK(pt: Point, k: Int): IndexedSeq[Entry[A]]

    Permalink

    Return a sequence of all entries found in the given search space.

  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def pretty: String

    Permalink

    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!

  28. def remove(entry: Entry[A]): RTree[A]

    Permalink

    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.

  29. def removeAll(entries: Iterable[Entry[A]]): RTree[A]

    Permalink

    Remove entries from the tree, returning a new tree.

  30. val root: Node[A]

    Permalink
  31. def search(space: Box, f: (Entry[A]) ⇒ Boolean): Seq[Entry[A]]

    Permalink

    Return a sequence of all entries found in the given search space.

  32. def search(space: Box): Seq[Entry[A]]

    Permalink

    Return a sequence of all entries found in the given search space.

  33. def searchIntersection(geom: Geom, f: (Entry[A]) ⇒ Boolean): Seq[Entry[A]]

    Permalink

    Return a sequence of all entries intersecting the given search space.

  34. def searchIntersection(geom: Geom): Seq[Entry[A]]

    Permalink

    Return a sequence of all entries intersecting the given search space.

  35. val size: Int

    Permalink
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. def toString(): String

    Permalink
    Definition Classes
    RTree → AnyRef → Any
  38. def values: Iterator[A]

    Permalink

    Return an iterator over all values in the tree.

  39. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped