Class

org.apache.flink.ml.nn

QuadTree

Related Doc: package nn

Permalink

class QuadTree extends AnyRef

n-dimensional QuadTree data structure; partitions spatial data for faster queries (e.g. KNN query) The skeleton of the data structure was initially based off of the 2D Quadtree found here: http://www.cs.trinity.edu/~mlewis/CSCI1321-F11/Code/src/util/Quadtree.scala

Many additional methods were added to the class both for efficient KNN queries and generalizing to n-dim.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QuadTree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new QuadTree(minVec: Vector, maxVec: Vector, distMetric: DistanceMetric, maxPerBox: Int)

    Permalink

    minVec

    vector of the corner of the bounding box with smallest coordinates

    maxVec

    vector of the corner of the bounding box with smallest coordinates

    distMetric

    metric, must be Euclidean or squareEuclidean

    maxPerBox

    threshold for number of points in each box before slitting a box

Type Members

  1. class Node extends AnyRef

    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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def insert(queryPoint: Vector): Unit

    Permalink

    Recursively adds an object to the tree

    Recursively adds an object to the tree

    queryPoint

    an object which is added

  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  16. def printTree(): Unit

    Permalink

    Prints tree for testing/debugging

  17. val root: Node

    Permalink
  18. def searchNeighbors(queryPoint: Vector, radius: Double): ListBuffer[Vector]

    Permalink

    Finds all objects within a neighborhood of queryPoint of a specified radius scope is modified from original 2D version in: http://www.cs.trinity.edu/~mlewis/CSCI1321-F11/Code/src/util/Quadtree.scala

    Finds all objects within a neighborhood of queryPoint of a specified radius scope is modified from original 2D version in: http://www.cs.trinity.edu/~mlewis/CSCI1321-F11/Code/src/util/Quadtree.scala

    original version only looks in minimal box; for the KNN Query, we look at all nearby boxes. The radius is determined from searchNeighborsSiblingQueue by defining a min-heap on the leaf nodes

    queryPoint

    a point which is center

    radius

    radius of scope

    returns

    all points within queryPoint with given radius

  19. def searchNeighborsSiblingQueue(queryPoint: Vector): ListBuffer[Vector]

    Permalink

    Used to zoom in on a region near a test point for a fast KNN query.

    Used to zoom in on a region near a test point for a fast KNN query. This capability is used in the KNN query to find k "near" neighbors n_1,...,n_k, from which one computes the max distance D_s to queryPoint. D_s is then used during the kNN query to find all points within a radius D_s of queryPoint using searchNeighbors. To find the "near" neighbors, a min-heap is defined on the leaf nodes of the leaf nodes of the minimal bounding box of the queryPoint. The priority of a leaf node is an appropriate notion of the distance between the test point and the node, which is defined by minDist(queryPoint),

    queryPoint

    a test point for which the method finds the minimal bounding box that queryPoint lies in and returns elements in that boxes siblings' leaf nodes

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped