Documentation of 'math.geom2d.point.KDTree2D' Java class
KDTree2D
math.geom2d.point

Class KDTree2D



  • public class KDTree2D
    extends java.lang.Object
    A data structure for storing a great number of points. During construction of the tree, median point in current coordinate is chosen for each step, ensuring the final tree is balanced. The cost for retrieving a point is O(log n).
    The cost for building the tree is O(n log^2 n), that can take some time for large points sets.
    This implementation is semi-dynamic: points can be added, but can not be removed.
    • Constructor Detail

      • KDTree2D

        public KDTree2D(java.util.ArrayList<Point2D> points)
    • Method Detail

      • contains

        public boolean contains(Point2D value)
      • add

        public void add(Point2D point)
      • rangeSearch

        public java.util.Collection<Point2D> rangeSearch(Box2D range)
      • main

        public static void main(java.lang.String[] args)
        Gives a small example of use.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.