Class MkTabLeafEntry
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.MTreeLeafEntry
-
- elki.index.tree.metrical.mtreevariants.mktrees.mktab.MkTabLeafEntry
-
- All Implemented Interfaces:
LeafEntry,MkTabEntry,MTreeEntry,java.io.Externalizable,java.io.Serializable
class MkTabLeafEntry extends MTreeLeafEntry implements MkTabEntry
Represents an entry in a leaf node of a MkTab-Tree. Additionally to a MTreeLeafEntry a MkTabLeafEntry holds a list of its knn distances for parameters k <= k_max.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private double[]knnDistancesThe knn distances of the underlying data object.private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description MkTabLeafEntry()Empty constructor for serialization purposes.MkTabLeafEntry(DBID objectID, double parentDistance, double[] knnDistances)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetKnnDistance(int k)Returns the knn distance of the entry for the specified parameter k.double[]getKnnDistances()Returns the list of knn distances of the entry.voidreadExternal(java.io.ObjectInput in)Calls the super method and reads the parameter k_max and knn distance of this entry from the specified input stream.voidsetKnnDistances(double[] knnDistances)Sets the knn distances of the entry.voidwriteExternal(java.io.ObjectOutput out)Calls the super method and writes the parameter k_max and the knn distances of this entry to the specified stream.-
Methods inherited from class elki.index.tree.metrical.mtreevariants.MTreeLeafEntry
equals, getCoveringRadius, getDBID, getParentDistance, getRoutingObjectID, hashCode, setCoveringRadius, setParentDistance, setRoutingObjectID
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.index.tree.metrical.mtreevariants.MTreeEntry
getCoveringRadius, getParentDistance, getRoutingObjectID, setCoveringRadius, setParentDistance, setRoutingObjectID
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
knnDistances
private double[] knnDistances
The knn distances of the underlying data object.
-
-
Constructor Detail
-
MkTabLeafEntry
public MkTabLeafEntry()
Empty constructor for serialization purposes.
-
MkTabLeafEntry
public MkTabLeafEntry(DBID objectID, double parentDistance, double[] knnDistances)
Constructor.- Parameters:
objectID- the id of the underlying data objectparentDistance- the distance from the underlying data object to its parent's routing objectknnDistances- the knn distances of the underlying data object
-
-
Method Detail
-
getKnnDistances
public double[] getKnnDistances()
Description copied from interface:MkTabEntryReturns the list of knn distances of the entry.- Specified by:
getKnnDistancesin interfaceMkTabEntry- Returns:
- the list of knn distances of the entry
-
setKnnDistances
public void setKnnDistances(double[] knnDistances)
Description copied from interface:MkTabEntrySets the knn distances of the entry.- Specified by:
setKnnDistancesin interfaceMkTabEntry- Parameters:
knnDistances- the knn distances to be set
-
getKnnDistance
public double getKnnDistance(int k)
Description copied from interface:MkTabEntryReturns the knn distance of the entry for the specified parameter k.- Specified by:
getKnnDistancein interfaceMkTabEntry- Parameters:
k- the parameter k of the knn distance- Returns:
- the knn distance of the entry
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionCalls the super method and writes the parameter k_max and the knn distances of this entry to the specified stream.- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classMTreeLeafEntry- 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 parameter k_max and knn distance of this entry from the specified input stream.- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classMTreeLeafEntry- 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.
-
-