Class LAESA.LAESAKNNSearcher<Q>

    • Field Detail

      • maxnc

        int maxnc
        Maximum number of distance computations before also pruning reference points.
    • Constructor Detail

      • LAESAKNNSearcher

        public LAESAKNNSearcher​(int k)
        Constructor.
        Parameters:
        k - condition parameter
    • Method Detail

      • laesaKNNSearch

        protected void laesaKNNSearch​(KNNHeap knns)
        Search the k nearest neighbors
        Parameters:
        knns - result heap
      • processPoints

        private int processPoints​(ModifiableDoubleDBIDList cands,
                                  DoubleDBIDListMIter iter,
                                  double threshold,
                                  double dxs,
                                  DoubleDataStore rdists,
                                  int nc)
        Process a set of points
        Parameters:
        cands - Points to process
        iter - iterator
        threshold - Pruning distance
        dxs - Distance to current point
        rdists - Precomputed distances
        nc - Number of distance computations
        Returns:
        Index of best candidate
      • findInRef

        private int findInRef​(DBIDRef p,
                              DBIDArrayIter ref)
        Find the given DBIDVar p in the reference iter
        Parameters:
        p - Object to find
        ref - Reference iterator
        Returns:
        index into the reference points list
      • queryDistance

        protected abstract double queryDistance​(DBIDRef p)
        Compute the distance to a candidate object.
        Parameters:
        p - Object
        Returns:
        Distance