Class MkCoPLeafEntry
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.MTreeLeafEntry
-
- elki.index.tree.metrical.mtreevariants.mktrees.mkcop.MkCoPLeafEntry
-
- All Implemented Interfaces:
LeafEntry,MkCoPEntry,MTreeEntry,java.io.Externalizable,java.io.Serializable
class MkCoPLeafEntry extends MTreeLeafEntry implements MkCoPEntry
Represents an entry in a leaf node of a MkCoP-Tree. Additionally to an MTreeLeafEntry an MkCoPLeafEntry holds the conservative and progressive approximation of its knn-distances.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private ApproximationLineconservativeApproximationThe conservative approximation.private ApproximationLineprogressiveApproximationThe progressive approximation.private static longserialVersionUIDSerialization version ID.
-
Constructor Summary
Constructors Constructor Description MkCoPLeafEntry()Empty constructor for serialization purposes.MkCoPLeafEntry(DBID objectID, double parentDistance, ApproximationLine conservativeApproximation, ApproximationLine progressiveApproximation)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.doubleapproximateProgressiveKnnDistance(int k)Returns the progressive approximated knn distance of the entry.ApproximationLinegetConservativeKnnDistanceApproximation()Returns the conservative approximation line.ApproximationLinegetProgressiveKnnDistanceApproximation()Returns the progressive approximation line.voidreadExternal(java.io.ObjectInput in)Calls the super method and reads the the conservative and progressive approximation of the knn distances of this entry from the specified input stream.voidsetConservativeKnnDistanceApproximation(ApproximationLine conservativeApproximation)Sets the conservative approximation linevoidsetProgressiveKnnDistanceApproximation(ApproximationLine progressiveApproximation)Sets the progressive approximation linejava.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)Calls the super method and writes the conservative and progressive approximation of 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, 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 ID.- See Also:
- Constant Field Values
-
conservativeApproximation
private ApproximationLine conservativeApproximation
The conservative approximation.
-
progressiveApproximation
private ApproximationLine progressiveApproximation
The progressive approximation.
-
-
Constructor Detail
-
MkCoPLeafEntry
public MkCoPLeafEntry()
Empty constructor for serialization purposes.
-
MkCoPLeafEntry
public MkCoPLeafEntry(DBID objectID, double parentDistance, ApproximationLine conservativeApproximation, ApproximationLine progressiveApproximation)
Constructor.- Parameters:
objectID- the id of the underlying data objectparentDistance- the distance from the underlying data object to its parent's routing objectconservativeApproximation- the conservative approximation of the knn distancesprogressiveApproximation- the progressive 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
-
approximateProgressiveKnnDistance
public double approximateProgressiveKnnDistance(int k)
Returns the progressive approximated knn distance of the entry.- Parameters:
k- the parameter k of the knn distance- Returns:
- the progressive approximated knn distance of the entry
-
getConservativeKnnDistanceApproximation
public ApproximationLine getConservativeKnnDistanceApproximation()
Returns the conservative approximation line.- Specified by:
getConservativeKnnDistanceApproximationin interfaceMkCoPEntry- Returns:
- the conservative approximation line
-
getProgressiveKnnDistanceApproximation
public ApproximationLine getProgressiveKnnDistanceApproximation()
Returns the progressive approximation line.- Returns:
- the progressive 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
-
setProgressiveKnnDistanceApproximation
public void setProgressiveKnnDistanceApproximation(ApproximationLine progressiveApproximation)
Sets the progressive approximation line- Parameters:
progressiveApproximation- the progressive approximation line to be set
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionCalls the super method and writes the conservative and progressive approximation of 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 the conservative and progressive approximation of the knn distances 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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-