public class MTreeLeafEntry extends java.lang.Object implements LeafEntry, MTreeEntry
| Modifier and Type | Field and Description |
|---|---|
private DBID |
id
Holds the id of the object (node or data object) represented by this entry.
|
private double |
parentDistance
The distance from the underlying data object to its parent's routing
object.
|
private static long |
serialVersionUID
Serialization version ID.
|
| Constructor and Description |
|---|
MTreeLeafEntry()
Empty constructor for serialization purposes.
|
MTreeLeafEntry(DBID objectID,
double parentDistance)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
double |
getCoveringRadius()
Returns zero, since a leaf entry has no covering radius.
|
DBID |
getDBID()
Get the DBID of this leaf entry.
|
double |
getParentDistance()
Returns the distance from the underlying data object to its parent's
routing object.
|
DBID |
getRoutingObjectID()
Returns the id of the underlying data object of this entry.
|
int |
hashCode() |
void |
readExternal(java.io.ObjectInput in) |
boolean |
setCoveringRadius(double coveringRadius)
Throws an UnsupportedOperationException, since a leaf entry has no covering
radius.
|
boolean |
setParentDistance(double parentDistance)
Sets the distance from the underlying data object to its parent's routing
object.
|
boolean |
setRoutingObjectID(DBID objectID)
Throws an UnsupportedOperationException, as leaves may not have routing
objects.
|
void |
writeExternal(java.io.ObjectOutput out) |
private static final long serialVersionUID
private DBID id
private double parentDistance
public MTreeLeafEntry()
public MTreeLeafEntry(DBID objectID, double parentDistance)
objectID - the id of the underlying data objectparentDistance - the distance from the underlying data object to its
parent's routing objectpublic DBID getDBID()
LeafEntrypublic final DBID getRoutingObjectID()
getRoutingObjectID in interface MTreeEntrypublic final boolean setRoutingObjectID(DBID objectID)
setRoutingObjectID in interface MTreeEntryobjectID - the id to be setjava.lang.UnsupportedOperationException - since leaf entries should not be
assigned a routing object.public final double getParentDistance()
getParentDistance in interface MTreeEntrypublic final boolean setParentDistance(double parentDistance)
setParentDistance in interface MTreeEntryparentDistance - the distance to be setpublic double getCoveringRadius()
getCoveringRadius in interface MTreeEntrypublic boolean setCoveringRadius(double coveringRadius)
setCoveringRadius in interface MTreeEntrycoveringRadius - the covering radius to be setjava.lang.UnsupportedOperationException - thrown since a leaf has no covering
radiuspublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2019 ELKI Development Team. License information.