Class ProjectedIndex.ProjectedKNNByObject

  • All Implemented Interfaces:
    KNNSearcher<O>
    Enclosing class:
    ProjectedIndex<O,​I>

    class ProjectedIndex.ProjectedKNNByObject
    extends java.lang.Object
    implements KNNSearcher<O>
    Class to proxy kNN queries.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) DistanceQuery<O> distq
      Distance query for refinement.
      (package private) KNNSearcher<I> inner
      Inner kNN query.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      KNNList getKNN​(O obj, 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
    • Constructor Detail

      • ProjectedKNNByObject

        public ProjectedKNNByObject​(DistanceQuery<O> distanceQuery,
                                    KNNSearcher<I> inner)
        Constructor.
        Parameters:
        inner - Inner kNN query.
    • Method Detail

      • getKNN

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