Class MkTreeRKNNQuery<O>

  • All Implemented Interfaces:
    RKNNSearcher<DBIDRef>

    public class MkTreeRKNNQuery<O>
    extends java.lang.Object
    implements RKNNSearcher<DBIDRef>
    Instance of a rKNN query for a particular spatial index.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Detail

      • distanceQuery

        protected DistanceQuery<O> distanceQuery
        Distance query
      • index

        protected final AbstractMkTree<O,​?,​?,​?> index
        The index to use
    • Constructor Detail

      • MkTreeRKNNQuery

        public MkTreeRKNNQuery​(AbstractMkTree<O,​?,​?,​?> index,
                               DistanceQuery<O> distanceQuery)
        Constructor.
        Parameters:
        index - Index to use
        distanceQuery - Distance query used
    • Method Detail

      • getRKNN

        public DoubleDBIDList getRKNN​(DBIDRef id,
                                      int k)
        Description copied from interface: RKNNSearcher
        Get the reverse k nearest neighbors for a particular object.
        Specified by:
        getRKNN in interface RKNNSearcher<O>
        Parameters:
        id - query object
        k - number of neighbors requested
        Returns:
        reverse k nearest neighbors