Interface NearestNeighborSearch<T>

All Superinterfaces:
EuclideanSpace
All Known Subinterfaces:
KNearestNeighborSearch<T>
All Known Implementing Classes:
KNearestNeighborSearchOnIterableRealInterval, KNearestNeighborSearchOnKDTree, NearestNeighborSearchOnIterableRealInterval, NearestNeighborSearchOnKDTree

public interface NearestNeighborSearch<T> extends EuclideanSpace
Nearest-neighbor search in an Euclidean space. The interface describes implementations that perform the search for a specified location and provide access to the data, location and distance of the found nearest neighbor until the next search is performed. In a multi-threaded application, each thread will thus need its own NearestNeighborSearch.
Author:
Stephan Saalfeld
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a copy.
    double
    Access the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.
    Access the position of the nearest neighbor, ordered by square Euclidean distance.
    Access the data of the nearest neighbor.
    double
    Access the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.
    void
    Perform nearest-neighbor search for a reference coordinate.

    Methods inherited from interface net.imglib2.EuclideanSpace

    numDimensions
  • Method Details

    • search

      void search(RealLocalizable reference)
      Perform nearest-neighbor search for a reference coordinate.
      Parameters:
      reference -
    • getSampler

      Sampler<T> getSampler()
      Access the data of the nearest neighbor. Data is accessed through a Sampler that guarantees write access if the underlying data set is writable.
    • getPosition

      RealLocalizable getPosition()
      Access the position of the nearest neighbor, ordered by square Euclidean distance.
    • getSquareDistance

      double getSquareDistance()
      Access the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.
    • getDistance

      double getDistance()
      Access the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.
    • copy

      Create a copy.