D
- the type of Distance used in the MkMaxTreeclass MkMaxLeafEntry<D extends Distance<D>> extends MTreeLeafEntry<D> implements MkMaxEntry<D>
MkMaxTree
. Additionally to
an MTreeLeafEntry an MkMaxLeafEntry holds the k-nearest neighbor distance of
the underlying data object.Modifier and Type | Field and Description |
---|---|
private D |
knnDistance
The k-nearest neighbor distance of the underlying data object.
|
private static long |
serialVersionUID
Serial version number
|
Constructor and Description |
---|
MkMaxLeafEntry()
Empty constructor for serialization purposes.
|
MkMaxLeafEntry(DBID objectID,
D parentDistance,
D knnDistance)
Provides a new MkMaxLeafEntry with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
D |
getKnnDistance()
Returns the knn distance of the entry.
|
void |
readExternal(ObjectInput in)
Calls the super method and reads the knn distance of this entry from the
specified input stream.
|
void |
setKnnDistance(D knnDistance)
Sets the knn distance of the entry.
|
void |
writeExternal(ObjectOutput out)
Calls the super method and writes the knn distance of this entry to the
specified stream.
|
getCoveringRadius, getParentDistance, getRoutingObjectID, setCoveringRadius, setParentDistance, setRoutingObjectID
getDBID, hashCode, isLeafEntry, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCoveringRadius, getParentDistance, getRoutingObjectID, setCoveringRadius, setParentDistance, setRoutingObjectID
isLeafEntry
private static final long serialVersionUID
public MkMaxLeafEntry()
public MkMaxLeafEntry(DBID objectID, D parentDistance, D knnDistance)
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 objectpublic D getKnnDistance()
MkMaxEntry
getKnnDistance
in interface MkMaxEntry<D extends Distance<D>>
public void setKnnDistance(D knnDistance)
MkMaxEntry
setKnnDistance
in interface MkMaxEntry<D extends Distance<D>>
knnDistance
- the knn distance to be setpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MTreeLeafEntry<D extends Distance<D>>
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class MTreeLeafEntry<D extends Distance<D>>
ClassNotFoundException
- If the class for an object being restored
cannot be found.IOException
public boolean equals(Object o)
equals
in class MTreeLeafEntry<D extends Distance<D>>
o
- the object to be tested