Class MkMaxDirectoryEntry

  • All Implemented Interfaces:
    DirectoryEntry, MkMaxEntry, MTreeEntry, java.io.Externalizable, java.io.Serializable

    class MkMaxDirectoryEntry
    extends MTreeDirectoryEntry
    implements MkMaxEntry
    Represents an entry in a directory node of an MkMaxTree. Additionally to an MTreeDirectoryEntry an MkMaxDirectoryEntry holds the knn distance of the underlying MkMax-Tree node.
    Since:
    0.1
    Author:
    Elke Achtert
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial version UID
        See Also:
        Constant Field Values
      • knnDistance

        private double knnDistance
        The aggregated k-nearest neighbor distance of the underlying MkMax-Tree node.
    • Constructor Detail

      • MkMaxDirectoryEntry

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

        public MkMaxDirectoryEntry​(DBID objectID,
                                   double parentDistance,
                                   int nodeID,
                                   double coveringRadius,
                                   double knnDistance)
        Constructor.
        Parameters:
        objectID - the id of the routing object
        parentDistance - the distance from the routing object of this entry to its parent's routing object
        nodeID - the id of the underlying node
        coveringRadius - the covering radius of the entry
        knnDistance - the aggregated knn distance of the underlying MkMax-Tree node
    • Method Detail

      • getKnnDistance

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

        public void setKnnDistance​(double knnDistance)
        Description copied from interface: MkMaxEntry
        Sets the knn distance of the entry.
        Specified by:
        setKnnDistance in interface MkMaxEntry
        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 MTreeDirectoryEntry
        Throws:
        java.io.IOException
      • 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 MTreeDirectoryEntry
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException