Class MkCoPDirectoryEntry
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.MTreeDirectoryEntry
-
- elki.index.tree.metrical.mtreevariants.mktrees.mkcop.MkCoPDirectoryEntry
-
- All Implemented Interfaces:
DirectoryEntry,MkCoPEntry,MTreeEntry,java.io.Externalizable,java.io.Serializable
class MkCoPDirectoryEntry extends MTreeDirectoryEntry implements MkCoPEntry
Represents an entry in a directory node of an MkCop-Tree. Additionally to an MTreeDirectoryEntry an MkCoPLeafEntry holds the conservative approximation of its knn-distances.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private ApproximationLineconservativeApproximationThe conservative approximation.private static longserialVersionUIDSerialization version number.
-
Constructor Summary
Constructors Constructor Description MkCoPDirectoryEntry()Empty constructor for serialization purposes.MkCoPDirectoryEntry(DBID objectID, double parentDistance, int nodeID, double coveringRadius, ApproximationLine conservativeApproximation)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleapproximateConservativeKnnDistance(int k)Returns the conservative approximated knn distance of the entry.ApproximationLinegetConservativeKnnDistanceApproximation()Returns the conservative approximation line.voidreadExternal(java.io.ObjectInput in)Calls the super method and reads the the conservative approximation of the knn distances of this entry from the specified input stream.voidsetConservativeKnnDistanceApproximation(ApproximationLine conservativeApproximation)Sets the conservative approximation linevoidwriteExternal(java.io.ObjectOutput out)Calls the super method and writes the conservative approximation of 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
Serialization version number.- See Also:
- Constant Field Values
-
conservativeApproximation
private ApproximationLine conservativeApproximation
The conservative approximation.
-
-
Constructor Detail
-
MkCoPDirectoryEntry
public MkCoPDirectoryEntry()
Empty constructor for serialization purposes.
-
MkCoPDirectoryEntry
public MkCoPDirectoryEntry(DBID objectID, double parentDistance, int nodeID, double coveringRadius, ApproximationLine conservativeApproximation)
Constructor.- Parameters:
objectID- the id of the routing objectparentDistance- the distance from the object to its parentnodeID- the id of the underlying nodecoveringRadius- the covering radius of the entryconservativeApproximation- the conservative approximation of the knn distances
-
-
Method Detail
-
approximateConservativeKnnDistance
public double approximateConservativeKnnDistance(int k)
Returns the conservative approximated knn distance of the entry.- Specified by:
approximateConservativeKnnDistancein interfaceMkCoPEntry- Parameters:
k- the parameter k of the knn distance- Returns:
- the conservative approximated knn distance of the entry
-
getConservativeKnnDistanceApproximation
public ApproximationLine getConservativeKnnDistanceApproximation()
Returns the conservative approximation line.- Specified by:
getConservativeKnnDistanceApproximationin interfaceMkCoPEntry- Returns:
- the conservative approximation line
-
setConservativeKnnDistanceApproximation
public void setConservativeKnnDistanceApproximation(ApproximationLine conservativeApproximation)
Sets the conservative approximation line- Specified by:
setConservativeKnnDistanceApproximationin interfaceMkCoPEntry- Parameters:
conservativeApproximation- the conservative approximation line to be set
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionCalls the super method and writes the conservative approximation of the knn distances of this entry to the specified stream.- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin 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.ClassNotFoundExceptionCalls the super method and reads the the conservative approximation of the knn distances of this entry from the specified input stream.- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin 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.
-
-