Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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.AbstractEntry
      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, MetricalEntry, 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.

Author:
Elke Achtert

Field Summary
private  D knnDistance
          The k-nearest neighbor distance of the underlying data object.
private static long serialVersionUID
           
 
Constructor Summary
MkMaxLeafEntry()
          Empty constructor for serialization purposes.
MkMaxLeafEntry(Integer 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, isLeafEntry, setCoveringRadius, setParentDistance, setRoutingObjectID
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractEntry
getID, hashCode, setID, 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
getID, isLeafEntry, setID
 

Field Detail

serialVersionUID

private static final long serialVersionUID
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(Integer 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.2 (2009-07-06_1820)