Class PointMapWrapper<T>

    • Method Detail

      • query

        public Index.PointIterator<T> query​(double[] min,
                                            double[] max)
        Specified by:
        query in interface PointMap<T>
        Parameters:
        min - Lower left corner of the query window
        max - Upper right corner of the query window
        Returns:
        All points that lie inside the query rectangle.
      • query1nn

        public Index.PointEntryKnn<T> query1nn​(double[] center)
        Description copied from interface: PointMap
        Finds the nearest neighbor. This uses Euclidean distance. Other distance types can only be specified directly on the index implementations.
        Specified by:
        query1nn in interface PointMap<T>
        Parameters:
        center - center point
        Returns:
        the nearest neighbor
      • queryKnn

        public Index.PointIteratorKnn<T> queryKnn​(double[] center,
                                                  int k)
        Description copied from interface: PointMap
        Finds the nearest neighbor. This uses Euclidean distance. Other distance types can only be specified directly on the index implementations.
        Specified by:
        queryKnn in interface PointMap<T>
        Parameters:
        center - center point
        k - number of neighbors
        Returns:
        list of nearest neighbors
      • insert

        public void insert​(double[] key,
                           T value)
        Description copied from interface: PointMap
        Insert a point.
        Specified by:
        insert in interface PointMap<T>
        Parameters:
        key - point
        value - value
      • remove

        public T remove​(double[] point)
        Description copied from interface: PointMap
        Remove a point entry.
        Specified by:
        remove in interface PointMap<T>
        Parameters:
        point - the point
        Returns:
        the value of the entry or null if the entry was not found
      • update

        public T update​(double[] oldPoint,
                        double[] newPoint)
        Description copied from interface: PointMap
        Update the position of an entry.
        Specified by:
        update in interface PointMap<T>
        Parameters:
        oldPoint - old position
        newPoint - new position
        Returns:
        the value of the entry or null if the entry was not found
      • contains

        public boolean contains​(double[] key)
        Description copied from interface: PointMap
        Lookup an entry, using exact match.
        Specified by:
        contains in interface PointMap<T>
        Parameters:
        key - the point
        Returns:
        `true` if an entry was found, otherwise `false`.
      • queryExact

        public T queryExact​(double[] point)
        Description copied from interface: PointMap
        Lookup an entry, using exact match.
        Specified by:
        queryExact in interface PointMap<T>
        Parameters:
        point - the point
        Returns:
        the value of the entry or null if the entry was not found
      • getDims

        public int getDims()
        Specified by:
        getDims in interface Index
        Returns:
        the number of dimensions
      • size

        public int size()
        Specified by:
        size in interface Index
        Returns:
        the number of entries
      • clear

        public void clear()
        Description copied from interface: Index
        Clear all entries.
        Specified by:
        clear in interface Index
      • getStats

        public Stats getStats()
        Specified by:
        getStats in interface Index
        Returns:
        Collect and return some index statistics. Note that indexes are not required to fill all fields. Also, individual indexes may use subclasses with additional fields.
      • getNodeCount

        public int getNodeCount()
        Specified by:
        getNodeCount in interface Index
      • getDepth

        public int getDepth()
        Specified by:
        getDepth in interface Index
      • toStringTree

        public String toStringTree()
        Specified by:
        toStringTree in interface Index
        Returns:
        a full string output of the tree structure with all entries