archery

Leaf

case class Leaf[A](children: Vector[Entry[A]], box: Box) extends Node[A] with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Node[A], Member, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Leaf
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Node
  7. Member
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Leaf(children: Vector[Entry[A]], box: Box)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val box: Box

    Definition Classes
    LeafNode
  8. val children: Vector[Entry[A]]

    Definition Classes
    LeafNode
  9. def clone(): AnyRef

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

    Determine if entry is contained in the tree.

    Determine if entry is contained in the tree.

    This method depends upon reasonable equality for A. It can only match an Entry(pt, x) if entry.value == x.value.

    Definition Classes
    Node
  11. def contract(gone: Geom, regen: ⇒ Box): Box

    Determine if we need to try contracting our bounding box based on the loss of 'geom'.

    Determine if we need to try contracting our bounding box based on the loss of 'geom'. If so, use the by-name parameter 'regen' to recalculate. Since regen is by-name, it won't be evaluated unless we need it.

    Definition Classes
    Node
  12. def count(space: Box): Int

    Definition Classes
    Node
  13. def entries: Vector[Entry[A]]

    Put all the entries this node contains (directly or indirectly) into a vector.

    Put all the entries this node contains (directly or indirectly) into a vector. Obviously this could be quite large in the case of a root node, so it should not be used for traversals.

    Definition Classes
    Node
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def finalize(): Unit

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

    Definition Classes
    Node
  17. def geom: Geom

    Definition Classes
    NodeMember
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def insert(entry: Entry[A]): Either[Vector[Node[A]], Node[A]]

    Insert a new Entry into the tree.

    Insert a new Entry into the tree.

    Since this node is immutable, the method will return a replacement. There are two possible situations:

    1. We can replace this node with a new node. This is the common case.

    2. This node was already "full", so we can't just replace it with a single node. Instead, we will split this node into (presumably) two new nodes, and return a vector of them.

    The reason we are using vector here is that it simplifies the implementation, and also because eventually we may support bulk insertion, where more than two nodes might be returned.

    Definition Classes
    Node
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def iterator: Iterator[Entry[A]]

    Returns an iterator over all the entires this node contains (directly or indirectly).

    Returns an iterator over all the entires this node contains (directly or indirectly). Since nodes are immutable there is no concern over concurrent updates while using the iterator.

    Definition Classes
    Node
  22. def map[B](f: (A) ⇒ B): Node[B]

    Definition Classes
    Node
  23. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def nearest(pt: Point, d0: Double): Option[(Double, Entry[A])]

    Definition Classes
    Node
  25. def nearestK(pt: Point, k: Int, d0: Double, pq: PriorityQueue[(Double, Entry[A])]): Double

    Definition Classes
    Node
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. def pretty: String

    Method to pretty-print an r-tree.

    Method to pretty-print an r-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!

    Definition Classes
    Node
  29. def remove(entry: Entry[A]): Option[(Joined[Entry[A]], Option[Node[A]])]

    Remove this entry from the tree.

    Remove this entry from the tree.

    The implementations for Leaf and Branch are somewhat involved, so they are defined in each subclass.

    The return value can be understood as follows:

    1. None: the entry was not found in this node. This is the most common case.

    2. Some((es, None)): the entry was found, and this node was removed (meaning after removal it had too few other children). The 'es' vector are entries that need to be readded to the RTree.

    3. Some((es, Some(node))): the entry was found, and this node should be replaced by 'node'. Like above, the 'es' vector contains entries that should be readded.

    Because adding entries may require rebalancing the tree, we defer the insertions until after the removal is complete and then readd them in RTree. While 'es' will usually be quite small, it's possible that in some cases it may be very large.

    TODO: To avoid allocating large vectors, we could create a custom collection which could be pieced together out of vectors and singletons.

    Definition Classes
    LeafNode
  30. def search(space: Box, f: (Entry[A]) ⇒ Boolean): Seq[Entry[A]]

    Performs a search for all entries in the search space.

    Performs a search for all entries in the search space.

    Points on the boundary of the search space will be included.

    Definition Classes
    Node
  31. def searchIterator(space: Box, f: (Entry[A]) ⇒ Boolean): Iterator[Entry[A]]

    Definition Classes
    Node
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Node[A]

Inherited from Member

Inherited from AnyRef

Inherited from Any

Ungrouped