Class RdKNNDirectoryEntry

    • Field Detail

      • knnDistance

        private double knnDistance
        The aggregated knn distance of this entry.
    • Constructor Detail

      • RdKNNDirectoryEntry

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

        public RdKNNDirectoryEntry​(int id,
                                   ModifiableHyperBoundingBox mbr,
                                   double knnDistance)
        Constructs a new RDkNNDirectoryEntry object with the given parameters.
        Parameters:
        id - the unique id of the underlying node
        mbr - the minimum bounding rectangle of the underlying node
        knnDistance - the aggregated knn distance of this entry
    • 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 SpatialDirectoryEntry
        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 SpatialDirectoryEntry
        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.