Class RdKNNLeafEntry

    • Field Detail

      • knnDistance

        private double knnDistance
        The knn distance of the underlying data object.
    • Constructor Detail

      • RdKNNLeafEntry

        public RdKNNLeafEntry()
        Empty constructor for serialization purposes.
      • RdKNNLeafEntry

        public RdKNNLeafEntry​(DBID id,
                              NumberVector vector,
                              double knnDistance)
        Constructs a new RDkNNLeafEntry object with the given parameters.
        Parameters:
        id - the unique id of the underlying data object
        vector - the underlying data object
        knnDistance - the knn distance of the underlying data object
    • Method Detail

      • getKnnDistance

        public double getKnnDistance()
        Description copied from interface: RdKNNEntry
        Returns the knn distance of this entry.
        Specified by:
        getKnnDistance in interface RdKNNEntry
        Returns:
        the knn distance of this entry
      • setKnnDistance

        public void setKnnDistance​(double knnDistance)
        Description copied from interface: RdKNNEntry
        Sets the knn distance of this entry.
        Specified by:
        setKnnDistance in interface RdKNNEntry
        Parameters:
        knnDistance - the knn distance to be set
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Calls the super method and writes the knn distance of this entry to the specified stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class SpatialPointLeafEntry
        Parameters:
        out - the stream to write the object to
        Throws:
        java.io.IOException - Includes any I/O exceptions that may occur
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Calls the super method and reads the knn distance of this entry from the specified input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class SpatialPointLeafEntry
        Parameters:
        in - the stream to read data from in order to restore the object
        Throws:
        java.io.IOException - if I/O errors occur
        java.lang.ClassNotFoundException - If the class for an object being restored cannot be found.