Class DoubleIntegerDBIDKNNList

    • Field Detail

      • k

        final int k
        The k value this list was generated for.
    • Constructor Detail

      • DoubleIntegerDBIDKNNList

        public DoubleIntegerDBIDKNNList()
        Constructor.
      • DoubleIntegerDBIDKNNList

        public DoubleIntegerDBIDKNNList​(int k,
                                        int size)
        Constructor.
        Parameters:
        k - K parameter
        size - Actual size
    • Method Detail

      • getK

        public int getK()
        Description copied from interface: KNNList
        Get the K parameter (note: this may be less than the size of the list!)
        Specified by:
        getK in interface KNNList
        Returns:
        K
      • getKNNDistance

        public double getKNNDistance()
        Description copied from interface: KNNList
        Get the distance to the k nearest neighbor, or infinity otherwise.
        Specified by:
        getKNNDistance in interface KNNList
        Returns:
        Maximum distance
      • subList

        public KNNList subList​(int k)
        Description copied from interface: KNNList
        Select a subset for a smaller k.
        Specified by:
        subList in interface KNNList
        Parameters:
        k - New k
        Returns:
        KNN result for the smaller k.
      • map

        public KNNList map​(java.util.function.DoubleUnaryOperator f)
        Description copied from interface: KNNList
        Function to project the knn list.
        Specified by:
        map in interface KNNList
        Parameters:
        f - Function to transform values
        Returns:
        projected list