de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkapp
Class MkAppDirectoryEntry<D extends NumberDistance<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.mkapp.MkAppDirectoryEntry<D>
All Implemented Interfaces:
DirectoryEntry, Entry, MkAppEntry<D>, MTreeEntry<D>, Externalizable, Serializable

 class MkAppDirectoryEntry<D extends NumberDistance<D,?>>
extends MTreeDirectoryEntry<D>
implements MkAppEntry<D>

Represents an entry in a directory node of a MkApp-Tree. Additionally to an MTreeDirectoryEntry an MkAppDirectoryEntry holds the polynomial approximation of its knn-distances.


Field Summary
private  PolynomialApproximation approximation
          The polynomial approximation.
private static long serialVersionUID
          Serial version UID
 
Constructor Summary
MkAppDirectoryEntry()
          Empty constructor for serialization purposes.
MkAppDirectoryEntry(DBID objectID, D parentDistance, Integer nodeID, D coveringRadius, PolynomialApproximation approximation)
          Provides a new MkCoPDirectoryEntry with the given parameters.
 
Method Summary
 double approximatedValueAt(int k)
          Returns the approximated value at the specified k.
 PolynomialApproximation getKnnDistanceApproximation()
          Returns the polynomial approximation.
 void readExternal(ObjectInput in)
          Calls the super method and reads the the polynomial approximation of the knn distances of this entry from the specified input stream.
 void setKnnDistanceApproximation(PolynomialApproximation approximation)
          Sets the polynomial approximation.
 void writeExternal(ObjectOutput out)
          Calls the super method and writes the polynomial approximation of the knn distances of this entry to the specified stream.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeDirectoryEntry
equals, 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

approximation

private PolynomialApproximation approximation
The polynomial approximation.

Constructor Detail

MkAppDirectoryEntry

public MkAppDirectoryEntry()
Empty constructor for serialization purposes.


MkAppDirectoryEntry

public MkAppDirectoryEntry(DBID objectID,
                           D parentDistance,
                           Integer nodeID,
                           D coveringRadius,
                           PolynomialApproximation approximation)
Provides a new MkCoPDirectoryEntry with the given parameters.

Parameters:
objectID - the id of the routing object
parentDistance - the distance from the object to its parent
nodeID - the id of the underlying node
coveringRadius - the covering radius of the entry
approximation - the polynomial approximation of the knn distances
Method Detail

approximatedValueAt

public double approximatedValueAt(int k)
Returns the approximated value at the specified k.

Specified by:
approximatedValueAt in interface MkAppEntry<D extends NumberDistance<D,?>>
Parameters:
k - the parameter k of the knn distance
Returns:
the approximated value at the specified k

getKnnDistanceApproximation

public PolynomialApproximation getKnnDistanceApproximation()
Returns the polynomial approximation.

Specified by:
getKnnDistanceApproximation in interface MkAppEntry<D extends NumberDistance<D,?>>
Returns:
the polynomial approximation

setKnnDistanceApproximation

public void setKnnDistanceApproximation(PolynomialApproximation approximation)
Sets the polynomial approximation.

Specified by:
setKnnDistanceApproximation in interface MkAppEntry<D extends NumberDistance<D,?>>
Parameters:
approximation - the polynomial approximation to be set

writeExternal

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

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class MTreeDirectoryEntry<D extends NumberDistance<D,?>>
Parameters:
out - the stream to write the object to
Throws:
IOException - Includes any I/O exceptions that may occur

readExternal

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

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class MTreeDirectoryEntry<D extends NumberDistance<D,?>>
Parameters:
in - the stream to read data from in order to restore the object
Throws:
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being restored cannot be found.

Release 0.4.0 (2011-09-20_1324)