Class MkTabDirectoryEntry
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.MTreeDirectoryEntry
-
- elki.index.tree.metrical.mtreevariants.mktrees.mktab.MkTabDirectoryEntry
-
- All Implemented Interfaces:
DirectoryEntry
,MkTabEntry
,MTreeEntry
,java.io.Externalizable
,java.io.Serializable
class MkTabDirectoryEntry extends MTreeDirectoryEntry implements MkTabEntry
Represents an entry in a directory node of a MkTab-Tree. Additionally to a MTreeLeafEntry a MkTabDirectoryEntry 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[]
knnDistances
The aggregated knn distances of the underlying node.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description MkTabDirectoryEntry()
Empty constructor for serialization purposes.MkTabDirectoryEntry(DBID objectID, double parentDistance, int nodeID, double coveringRadius, double[] knnDistances)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getKnnDistance(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.void
readExternal(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.void
setKnnDistances(double[] knnDistances)
Sets the knn distances of the entry.void
writeExternal(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.MTreeDirectoryEntry
equals, getCoveringRadius, getPageID, getParentDistance, getRoutingObjectID, hashCode, setCoveringRadius, setParentDistance, setRoutingObjectID, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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 aggregated knn distances of the underlying node.
-
-
Constructor Detail
-
MkTabDirectoryEntry
public MkTabDirectoryEntry()
Empty constructor for serialization purposes.
-
MkTabDirectoryEntry
public MkTabDirectoryEntry(DBID objectID, double parentDistance, int nodeID, double coveringRadius, double[] knnDistances)
Constructor.- Parameters:
objectID
- the id of the routing objectparentDistance
- the distance from the routing object of this entry to its parent's routing objectnodeID
- the id of the underlying nodecoveringRadius
- the covering radius of the entryknnDistances
- the aggregated knn distances of the underlying node
-
-
Method Detail
-
getKnnDistances
public double[] getKnnDistances()
Description copied from interface:MkTabEntry
Returns the list of knn distances of the entry.- Specified by:
getKnnDistances
in interfaceMkTabEntry
- Returns:
- the list of knn distances of the entry
-
setKnnDistances
public void setKnnDistances(double[] knnDistances)
Description copied from interface:MkTabEntry
Sets the knn distances of the entry.- Specified by:
setKnnDistances
in interfaceMkTabEntry
- Parameters:
knnDistances
- the knn distances to be set
-
getKnnDistance
public double getKnnDistance(int k)
Description copied from interface:MkTabEntry
Returns the knn distance of the entry for the specified parameter k.- Specified by:
getKnnDistance
in 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.IOException
Calls the super method and writes the parameter k_max and the knn distances of this entry to the specified stream.- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classMTreeDirectoryEntry
- 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.ClassNotFoundException
Calls the super method and reads the parameter k_max and knn distance of this entry from the specified input stream.- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classMTreeDirectoryEntry
- 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.
-
-