Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkapp
Class MkAppLeafEntry<D extends NumberDistance<D,N>,N extends Number>

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.mkapp.MkAppLeafEntry<D,N>
All Implemented Interfaces:
Entry, MetricalEntry, MkAppEntry<D,N>, MTreeEntry<D>, Externalizable, Serializable

 class MkAppLeafEntry<D extends NumberDistance<D,N>,N extends Number>
extends MTreeLeafEntry<D>
implements MkAppEntry<D,N>

Represents an entry in a leaf node of a MkApp-Tree. Additionally to an MTreeLeafEntry an MkAppLeafEntry holds the polynomial approximation of its knn-distances.

Author:
Elke Achtert

Field Summary
private  PolynomialApproximation approximation
          The polynomial approximation.
private static long serialVersionUID
           
 
Constructor Summary
MkAppLeafEntry()
          Empty constructor for serialization purposes.
MkAppLeafEntry(Integer objectID, D parentDistance, PolynomialApproximation approximation)
          Provides a new MkAppLeafEntry 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.
 String toString()
          Returns a string representation of this entry.
 void writeExternal(ObjectOutput out)
          Calls the super method and writes the polynomiale 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.MTreeLeafEntry
equals, getCoveringRadius, getParentDistance, getRoutingObjectID, isLeafEntry, setCoveringRadius, setParentDistance, setRoutingObjectID
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractEntry
getID, hashCode, setID
 
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

approximation

private PolynomialApproximation approximation
The polynomial approximation.

Constructor Detail

MkAppLeafEntry

public MkAppLeafEntry()
Empty constructor for serialization purposes.


MkAppLeafEntry

public MkAppLeafEntry(Integer objectID,
                      D parentDistance,
                      PolynomialApproximation approximation)
Provides a new MkAppLeafEntry 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
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,N>,N extends Number>
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,N>,N extends Number>
Returns:
the polynomial approximation

setKnnDistanceApproximation

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

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

writeExternal

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

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class MTreeLeafEntry<D extends NumberDistance<D,N>>
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 MTreeLeafEntry<D extends NumberDistance<D,N>>
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.

toString

public String toString()
Returns a string representation of this entry.

Overrides:
toString in class AbstractEntry
Returns:
a string representation of this entry

Release 0.3 (2010-03-31_1612)