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 double
knnDistance
The aggregated knn distance of this entry.private static long
serialVersionUID
-
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 double
getKnnDistance()
Returns the knn distance of this entry.void
readExternal(java.io.ObjectInput in)
Calls the super method and reads the knn distance of this entry from the specified input stream.void
setKnnDistance(double knnDistance)
Sets the knn distance of this entry.void
writeExternal(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:RdKNNEntry
Returns the knn distance of this entry.- Specified by:
getKnnDistance
in interfaceRdKNNEntry
- 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 interfaceRdKNNEntry
- 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 interfacejava.io.Externalizable
- Overrides:
writeExternal
in 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.ClassNotFoundException
Calls the super method and reads the knn distance of this entry from the specified input stream.- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in 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.
-
-