public class RdKNNLeafEntry extends SpatialPointLeafEntry implements RdKNNEntry
NumberVector.Factory<V extends NumberVector>
Modifier and Type | Field and Description |
---|---|
private double |
knnDistance
The knn distance of the underlying data object.
|
private static long |
serialVersionUID |
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
TYPE
Constructor and Description |
---|
RdKNNLeafEntry()
Empty constructor for serialization purposes.
|
RdKNNLeafEntry(DBID id,
NumberVector vector,
double knnDistance)
Constructs a new RDkNNLeafEntry object with the given parameters.
|
Modifier and Type | Method and 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.
|
doubleValue, equals, getDBID, getDimensionality, hashCode, longValue, toArray
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getDimensionality, getMax, getMin
byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue
toString
private static final long serialVersionUID
private double knnDistance
public RdKNNLeafEntry()
public RdKNNLeafEntry(DBID id, NumberVector vector, double knnDistance)
id
- the unique id of the underlying data objectvector
- the underlying data objectknnDistance
- the knn distance of the underlying data objectpublic double getKnnDistance()
RdKNNEntry
getKnnDistance
in interface RdKNNEntry
public void setKnnDistance(double knnDistance)
RdKNNEntry
setKnnDistance
in interface RdKNNEntry
knnDistance
- the knn distance to be setpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class SpatialPointLeafEntry
out
- the stream to write the object tojava.io.IOException
- Includes any I/O exceptions that may occurpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class SpatialPointLeafEntry
in
- the stream to read data from in order to restore the objectjava.io.IOException
- if I/O errors occurjava.lang.ClassNotFoundException
- If the class for an object being restored
cannot be found.Copyright © 2019 ELKI Development Team. License information.