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()
LeafEntry
public final DBID getRoutingObjectID()
getRoutingObjectID
in interface MTreeEntry
public final boolean setRoutingObjectID(DBID objectID)
setRoutingObjectID
in interface MTreeEntry
objectID
- the id to be setjava.lang.UnsupportedOperationException
- since leaf entries should not be
assigned a routing object.public final double getParentDistance()
getParentDistance
in interface MTreeEntry
public final boolean setParentDistance(double parentDistance)
setParentDistance
in interface MTreeEntry
parentDistance
- the distance to be setpublic double getCoveringRadius()
getCoveringRadius
in interface MTreeEntry
public boolean setCoveringRadius(double coveringRadius)
setCoveringRadius
in interface MTreeEntry
coveringRadius
- 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.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.