Class RdKNNLeafEntry
- java.lang.Object
-
- elki.index.tree.spatial.SpatialPointLeafEntry
-
- elki.index.tree.spatial.rstarvariants.rdknn.RdKNNLeafEntry
-
- All Implemented Interfaces:
FeatureVector<java.lang.Number>,NumberVector,SpatialComparable,LeafEntry,RdKNNEntry,SpatialEntry,java.io.Externalizable,java.io.Serializable
public class RdKNNLeafEntry extends SpatialPointLeafEntry implements RdKNNEntry
Represents an entry in a leaf node of an RdKNN-Tree. Additionally to a SpatialLeafEntry a RdKNNLeafEntry holds the knn distance of the underlying data object.- Since:
- 0.1
- Author:
- Elke Achtert
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.data.NumberVector
NumberVector.Factory<V extends NumberVector>
-
-
Field Summary
Fields Modifier and Type Field Description private doubleknnDistanceThe knn distance of the underlying data object.private static longserialVersionUID-
Fields inherited from interface elki.data.FeatureVector
TYPE
-
Fields inherited from interface elki.data.NumberVector
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
-
-
Constructor Summary
Constructors Constructor Description RdKNNLeafEntry()Empty constructor for serialization purposes.RdKNNLeafEntry(DBID id, NumberVector vector, double knnDistance)Constructs a new RDkNNLeafEntry 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.SpatialPointLeafEntry
doubleValue, equals, getDBID, getDimensionality, hashCode, longValue, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.data.FeatureVector
toString
-
Methods inherited from interface elki.data.NumberVector
byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue
-
Methods inherited from interface elki.data.spatial.SpatialComparable
getDimensionality
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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 objectvector- the underlying data objectknnDistance- the knn distance of the underlying data object
-
-
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 classSpatialPointLeafEntry- 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 classSpatialPointLeafEntry- 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.
-
-