Class LinearScanKNNByDBID<O>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      KNNList getKNN​(DBIDRef id, int k)
      Get the k nearest neighbors for a particular object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • distanceQuery

        private final DistanceQuery<O> distanceQuery
        Hold the distance function to be used.
    • Constructor Detail

      • LinearScanKNNByDBID

        public LinearScanKNNByDBID​(DistanceQuery<O> distanceQuery)
        Constructor.
        Parameters:
        distanceQuery - Distance function to use
    • Method Detail

      • getKNN

        public KNNList getKNN​(DBIDRef id,
                              int k)
        Description copied from interface: KNNSearcher
        Get the k nearest neighbors for a particular object.
        Specified by:
        getKNN in interface KNNSearcher<O>
        Parameters:
        id - query object
        k - Number of neighbors requested
        Returns:
        neighbors