Class RdKNNDirectoryEntry
- java.lang.Object
-
- elki.index.tree.spatial.SpatialDirectoryEntry
-
- elki.index.tree.spatial.rstarvariants.rdknn.RdKNNDirectoryEntry
-
- All Implemented Interfaces:
SpatialComparable,DirectoryEntry,RdKNNEntry,SpatialEntry,java.io.Externalizable,java.io.Serializable
public class RdKNNDirectoryEntry extends SpatialDirectoryEntry implements RdKNNEntry
Represents an entry in a directory node of an RdKNN-Tree. Additionally to a SpatialDirectoryEntry a RdKNNDirectoryEntry holds the knn distance of the underlying RdKNN-Tree node.- Since:
- 0.1
- Author:
- Elke Achtert
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private doubleknnDistanceThe aggregated knn distance of this entry.private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description RdKNNDirectoryEntry()Empty constructor for serialization purposes.RdKNNDirectoryEntry(int id, ModifiableHyperBoundingBox mbr, double knnDistance)Constructs a new RDkNNDirectoryEntry object with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetKnnDistance()Returns the knn distance of this entry.voidreadExternal(java.io.ObjectInput in)Calls the super method and reads the knn distance of this entry from the specified input stream.voidsetKnnDistance(double knnDistance)Sets the knn distance of this entry.voidwriteExternal(java.io.ObjectOutput out)Calls the super method and writes the knn distance of this entry to the specified stream.-
Methods inherited from class elki.index.tree.spatial.SpatialDirectoryEntry
equals, extendMBR, getDimensionality, getMax, getMin, getPageID, hashCode, hasMBR, setMBR, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface elki.data.spatial.SpatialComparable
getDimensionality, getMax, getMin
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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 nodembr- the minimum bounding rectangle of the underlying nodeknnDistance- the aggregated knn distance of this entry
-
-
Method Detail
-
getKnnDistance
public double getKnnDistance()
Description copied from interface:RdKNNEntryReturns the knn distance of this entry.- Specified by:
getKnnDistancein interfaceRdKNNEntry- Returns:
- the knn distance of this entry
-
setKnnDistance
public void setKnnDistance(double knnDistance)
Description copied from interface:RdKNNEntrySets the knn distance of this entry.- Specified by:
setKnnDistancein interfaceRdKNNEntry- Parameters:
knnDistance- the knn distance to be set
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionCalls the super method and writes the knn distance of this entry to the specified stream.- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classSpatialDirectoryEntry- 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.ClassNotFoundExceptionCalls the super method and reads the knn distance of this entry from the specified input stream.- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classSpatialDirectoryEntry- Parameters:
in- the stream to read data from in order to restore the object- Throws:
java.io.IOException- if I/O errors occurjava.lang.ClassNotFoundException- If the class for an object being restored cannot be found.
-
-