Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.persistent.AbstractPage<N>
      extended by de.lmu.ifi.dbs.elki.index.tree.AbstractNode<N,E>
          extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,D,MkAppTreeNode<O,D,N>,MkAppEntry<D,N>>
              extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkapp.MkAppTreeNode<O,D,N>
All Implemented Interfaces:
MetricalNode<MkAppTreeNode<O,D,N>,MkAppEntry<D,N>>, Node<MkAppTreeNode<O,D,N>,MkAppEntry<D,N>>, Page<MkAppTreeNode<O,D,N>>, Externalizable, Serializable

 class MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>
extends AbstractMTreeNode<O,D,MkAppTreeNode<O,D,N>,MkAppEntry<D,N>>

Represents a node in an MkApp-Tree.

Author:
Elke Achtert

Field Summary
private static long serialVersionUID
           
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractNode
eclass, entries, isLeaf, numEntries
 
Constructor Summary
MkAppTreeNode()
          Empty constructor for Externalizable interface.
MkAppTreeNode(PageFile<MkAppTreeNode<O,D,N>> file, int capacity, boolean isLeaf)
          Creates a MkAppTreeNode object.
 
Method Summary
 void adjustEntry(MkAppEntry<D,N> entry, Integer routingObjectID, D parentDistance, AbstractMTree<O,D,MkAppTreeNode<O,D,N>,MkAppEntry<D,N>> mTree)
          Adjusts the parameters of the entry representing this node.
protected  MkAppTreeNode<O,D,N> createNewDirectoryNode(int capacity)
          Creates a new directory node with the specified capacity.
protected  MkAppTreeNode<O,D,N> createNewLeafNode(int capacity)
          Creates a new leaf node with the specified capacity.
protected  void integrityCheckParameters(MkAppEntry<D,N> parentEntry, MkAppTreeNode<O,D,N> parent, int index, AbstractMTree<O,D,MkAppTreeNode<O,D,N>,MkAppEntry<D,N>> mTree)
          Tests, if the parameters of the entry representing this node, are correctly set.
protected  PolynomialApproximation knnDistanceApproximation()
          Determines and returns the polynomial approximation for the knn distances of this node as the maximum of the polynomial approximations of all entries.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTreeNode
coveringRadius, integrityCheck, splitEntries
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractNode
addDirectoryEntry, addLeafEntry, children, deleteAllEntries, deleteEntry, equals, getCapacity, getEntries, getEntry, getNumEntries, increaseEntries, isLeaf, readExternal, toString, writeExternal
 
Methods inherited from class de.lmu.ifi.dbs.elki.persistent.AbstractPage
getFile, getID, hashCode, isDirty, setDirty, setFile, 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.Node
addDirectoryEntry, addLeafEntry, children, getEntry, getNumEntries, isLeaf
 
Methods inherited from interface de.lmu.ifi.dbs.elki.persistent.Page
getID, isDirty, setDirty, setFile, setID
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

MkAppTreeNode

public MkAppTreeNode()
Empty constructor for Externalizable interface.


MkAppTreeNode

public MkAppTreeNode(PageFile<MkAppTreeNode<O,D,N>> file,
                     int capacity,
                     boolean isLeaf)
Creates a MkAppTreeNode object.

Parameters:
file - the file storing the MCop-Tree
capacity - the capacity (maximum number of entries plus 1 for overflow) of this node
isLeaf - indicates whether this node is a leaf node
Method Detail

createNewLeafNode

protected MkAppTreeNode<O,D,N> createNewLeafNode(int capacity)
Creates a new leaf node with the specified capacity.

Specified by:
createNewLeafNode in class AbstractNode<MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkAppEntry<D extends NumberDistance<D,N>,N extends Number>>
Parameters:
capacity - the capacity of the new node
Returns:
a new leaf node

createNewDirectoryNode

protected MkAppTreeNode<O,D,N> createNewDirectoryNode(int capacity)
Creates a new directory node with the specified capacity.

Specified by:
createNewDirectoryNode in class AbstractNode<MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkAppEntry<D extends NumberDistance<D,N>,N extends Number>>
Parameters:
capacity - the capacity of the new node
Returns:
a new directory node

knnDistanceApproximation

protected PolynomialApproximation knnDistanceApproximation()
Determines and returns the polynomial approximation for the knn distances of this node as the maximum of the polynomial approximations of all entries.

Returns:
the conservative approximation for the knn distances

adjustEntry

public void adjustEntry(MkAppEntry<D,N> entry,
                        Integer routingObjectID,
                        D parentDistance,
                        AbstractMTree<O,D,MkAppTreeNode<O,D,N>,MkAppEntry<D,N>> mTree)
Adjusts the parameters of the entry representing this node.

Overrides:
adjustEntry in class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkAppEntry<D extends NumberDistance<D,N>,N extends Number>>
Parameters:
entry - the entry representing this node
routingObjectID - the id of the (new) routing object of this node
parentDistance - the distance from the routing object of this node to the routing object of the parent node
mTree - the M-Tree object holding this node

integrityCheckParameters

protected void integrityCheckParameters(MkAppEntry<D,N> parentEntry,
                                        MkAppTreeNode<O,D,N> parent,
                                        int index,
                                        AbstractMTree<O,D,MkAppTreeNode<O,D,N>,MkAppEntry<D,N>> mTree)
Description copied from class: AbstractMTreeNode
Tests, if the parameters of the entry representing this node, are correctly set. Subclasses may need to overwrite this method.

Overrides:
integrityCheckParameters in class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkAppEntry<D extends NumberDistance<D,N>,N extends Number>>
Parameters:
parentEntry - the entry representing the parent
parent - the parent holding the entry representing this node
index - the index of the entry in the parents child arry
mTree - the M-Tree holding this node

Release 0.3 (2010-03-31_1612)