Package elki.index

Interface KNNIndex<O>

    • Method Detail

      • kNNByObject

        KNNSearcher<O> kNNByObject​(DistanceQuery<O> distanceQuery,
                                   int maxk,
                                   int flags)
        Get a KNN query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Parameters:
        distanceQuery - Distance query
        maxk - Maximum value of k
        flags - Hints for the optimizer
        Returns:
        KNN Query object or null
      • kNNByDBID

        default KNNSearcher<DBIDRef> kNNByDBID​(DistanceQuery<O> distanceQuery,
                                               int maxk,
                                               int flags)
        Get a KNN query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Parameters:
        distanceQuery - Distance query
        maxk - Maximum value of k
        flags - Hints for the optimizer
        Returns:
        KNN Query object or null