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_LENGTHTYPE| 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, toArrayclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetDimensionality, getMax, getMinbyteValue, floatValue, getMax, getMin, getValue, intValue, shortValuetoStringprivate 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()
RdKNNEntrygetKnnDistance in interface RdKNNEntrypublic void setKnnDistance(double knnDistance)
RdKNNEntrysetKnnDistance in interface RdKNNEntryknnDistance - the knn distance to be setpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class SpatialPointLeafEntryout - 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.ExternalizablereadExternal in class SpatialPointLeafEntryin - 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.