Class MkMaxLeafEntry
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.MTreeLeafEntry
-
- elki.index.tree.metrical.mtreevariants.mktrees.mkmax.MkMaxLeafEntry
-
- All Implemented Interfaces:
LeafEntry
,MkMaxEntry
,MTreeEntry
,java.io.Externalizable
,java.io.Serializable
class MkMaxLeafEntry extends MTreeLeafEntry implements MkMaxEntry
Represents an entry in a leaf node of anMkMaxTree
. Additionally to an MTreeLeafEntry an MkMaxLeafEntry holds the k-nearest neighbor distance of the underlying data object.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private double
knnDistance
The k-nearest neighbor distance of the underlying data object.private static long
serialVersionUID
Serial version number
-
Constructor Summary
Constructors Constructor Description MkMaxLeafEntry()
Empty constructor for serialization purposes.MkMaxLeafEntry(DBID objectID, double parentDistance, double knnDistance)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getKnnDistance()
Returns the knn distance of the 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 the 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.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
Serial version number- See Also:
- Constant Field Values
-
knnDistance
private double knnDistance
The k-nearest neighbor distance of the underlying data object.
-
-
Constructor Detail
-
MkMaxLeafEntry
public MkMaxLeafEntry()
Empty constructor for serialization purposes.
-
MkMaxLeafEntry
public MkMaxLeafEntry(DBID objectID, double parentDistance, double knnDistance)
Constructor.- Parameters:
objectID
- the id of the underlying data objectparentDistance
- the distance from the underlying data object to its parent's routing objectknnDistance
- the knn distance of the underlying data object
-
-
Method Detail
-
getKnnDistance
public double getKnnDistance()
Description copied from interface:MkMaxEntry
Returns the knn distance of the entry.- Specified by:
getKnnDistance
in interfaceMkMaxEntry
- Returns:
- the knn distance of the entry
-
setKnnDistance
public void setKnnDistance(double knnDistance)
Description copied from interface:MkMaxEntry
Sets the knn distance of the entry.- Specified by:
setKnnDistance
in interfaceMkMaxEntry
- 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 classMTreeLeafEntry
- Throws:
java.io.IOException
-
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 classMTreeLeafEntry
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-