de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkmax
Class MkMaxLeafEntry<D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.tree.AbstractLeafEntry
      extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeLeafEntry<D>
          extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkmax.MkMaxLeafEntry<D>
Type Parameters:
D - the type of Distance used in the MkMaxTree
All Implemented Interfaces:
Entry, LeafEntry, MkMaxEntry<D>, MTreeEntry<D>, Externalizable, Serializable

 class MkMaxLeafEntry<D extends Distance<D>>
extends MTreeLeafEntry<D>
implements MkMaxEntry<D>

Represents an entry in a leaf node of an MkMaxTree. Additionally to an MTreeLeafEntry an MkMaxLeafEntry holds the k-nearest neighbor distance of the underlying data object.


Field Summary
private  D knnDistance
          The k-nearest neighbor distance of the underlying data object.
private static long serialVersionUID
          Serial version number
 
Constructor Summary
MkMaxLeafEntry()
          Empty constructor for serialization purposes.
MkMaxLeafEntry(DBID objectID, D parentDistance, D knnDistance)
          Provides a new MkMaxLeafEntry with the given parameters.
 
Method Summary
 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.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeLeafEntry
getCoveringRadius, getParentDistance, getRoutingObjectID, setCoveringRadius, setParentDistance, setRoutingObjectID
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractLeafEntry
getDBID, hashCode, isLeafEntry, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeEntry
getCoveringRadius, getParentDistance, getRoutingObjectID, setCoveringRadius, setParentDistance, setRoutingObjectID
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.Entry
isLeafEntry
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version number

See Also:
Constant Field Values

knnDistance

private D extends Distance<D> knnDistance
The k-nearest neighbor distance of the underlying data object.

Constructor Detail

MkMaxLeafEntry

public MkMaxLeafEntry()
Empty constructor for serialization purposes.


MkMaxLeafEntry

public MkMaxLeafEntry(DBID objectID,
                      D parentDistance,
                      D knnDistance)
Provides a new MkMaxLeafEntry with the given parameters.

Parameters:
objectID - the id of the underlying data object
parentDistance - the distance from the underlying data object to its parent's routing object
knnDistance - the knn distance of the underlying data object
Method Detail

getKnnDistance

public D getKnnDistance()
Description copied from interface: MkMaxEntry
Returns the knn distance of the entry.

Specified by:
getKnnDistance in interface MkMaxEntry<D extends Distance<D>>
Returns:
the knn distance of the entry

setKnnDistance

public void setKnnDistance(D knnDistance)
Description copied from interface: MkMaxEntry
Sets the knn distance of the entry.

Specified by:
setKnnDistance in interface MkMaxEntry<D extends Distance<D>>
Parameters:
knnDistance - the knn distance to be set

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Calls the super method and writes the knn distance of this entry to the specified stream.

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class MTreeLeafEntry<D extends Distance<D>>
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Calls the super method and reads the knn distance of this entry from the specified input stream.

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class MTreeLeafEntry<D extends Distance<D>>
Throws:
ClassNotFoundException - If the class for an object being restored cannot be found.
IOException

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class MTreeLeafEntry<D extends Distance<D>>
Parameters:
o - the object to be tested
Returns:
true, if the super method returns true and o is an MkMaxLeafEntry and has the same knnDistance as this entry.

Release 0.4.0 (2011-09-20_1324)