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

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

 class MkMaxDirectoryEntry<D extends Distance<D>>
extends MTreeDirectoryEntry<D>
implements MkMaxEntry<D>

Represents an entry in a directory node of an MkMaxTree. Additionally to an MTreeDirectoryEntry an MkMaxDirectoryEntry holds the knn distance of the underlying MkMax-Tree node.


Field Summary
private  D knnDistance
          The aggregated k-nearest neighbor distance of the underlying MkMax-Tree node.
private static long serialVersionUID
          Serial version UID
 
Constructor Summary
MkMaxDirectoryEntry()
          Empty constructor for serialization purposes.
MkMaxDirectoryEntry(DBID objectID, D parentDistance, Integer nodeID, D coveringRadius, D knnDistance)
          Provides a new MkMaxDirectoryEntry 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.MTreeDirectoryEntry
getCoveringRadius, getParentDistance, getRoutingObjectID, setCoveringRadius, setParentDistance, setRoutingObjectID, toString
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractDirectoryEntry
getEntryID, getPageID, hashCode, isLeafEntry
 
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 UID

See Also:
Constant Field Values

knnDistance

private D extends Distance<D> knnDistance
The aggregated k-nearest neighbor distance of the underlying MkMax-Tree node.

Constructor Detail

MkMaxDirectoryEntry

public MkMaxDirectoryEntry()
Empty constructor for serialization purposes.


MkMaxDirectoryEntry

public MkMaxDirectoryEntry(DBID objectID,
                           D parentDistance,
                           Integer nodeID,
                           D coveringRadius,
                           D knnDistance)
Provides a new MkMaxDirectoryEntry with the given parameters.

Parameters:
objectID - the id of the routing object
parentDistance - the distance from the routing object of this entry to its parent's routing object
nodeID - the id of the underlying node
coveringRadius - the covering radius of the entry
knnDistance - the aggregated knn distance of the underlying MkMax-Tree node
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 MTreeDirectoryEntry<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 MTreeDirectoryEntry<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 MTreeDirectoryEntry<D extends Distance<D>>
Parameters:
o - the object to be tested
Returns:
true, if the super method returns true and o is an MkMaxDirectoryEntry and has the same knnDistance as this entry.

Release 0.4.0 (2011-09-20_1324)