Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants
Class AbstractMTreeNode<O extends DatabaseObject,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>

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,N,E>
Type Parameters:
O - the type of DatabaseObject to be stored in the M-Tree
D - the type of Distance used in the M-Tree
N - the type of AbstractMTreeNode used in the M-Tree
E - the type of MetricalEntry used in the M-Tree
All Implemented Interfaces:
MetricalNode<N,E>, Node<N,E>, Page<N>, Externalizable, Serializable
Direct Known Subclasses:
MkAppTreeNode, MkCoPTreeNode, MkMaxTreeNode, MkTabTreeNode, MTreeNode

public abstract class AbstractMTreeNode<O extends DatabaseObject,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
extends AbstractNode<N,E>
implements MetricalNode<N,E>

Abstract super class for nodes in M-Tree variants.

Author:
Elke Achtert
See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractNode
eclass, entries, isLeaf, numEntries
 
Constructor Summary
AbstractMTreeNode()
          Empty constructor for Externalizable interface.
AbstractMTreeNode(PageFile<N> file, int capacity, boolean isLeaf, Class<? super E> eclass)
          Creates a new MTreeNode with the specified parameters.
 
Method Summary
 void adjustEntry(E entry, Integer routingObjectID, D parentDistance, AbstractMTree<O,D,N,E> mTree)
          Adjusts the parameters of the entry representing this node (e.g. after insertion of new objects).
 D coveringRadius(Integer routingObjectID, AbstractMTree<O,D,N,E> mTree)
          Determines and returns the covering radius of this node.
 void integrityCheck(AbstractMTree<O,D,N,E> mTree, E entry)
          Tests this node (for debugging purposes).
protected  void integrityCheckParameters(E parentEntry, N parent, int index, AbstractMTree<O,D,N,E> mTree)
          Tests, if the parameters of the entry representing this node, are correctly set.
 N splitEntries(List<E> assignmentsToFirst, List<E> assignmentsToSecond)
          Splits the entries of this node into a new node at the specified splitPoint and returns the newly created node.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.AbstractNode
addDirectoryEntry, addLeafEntry, children, createNewDirectoryNode, createNewLeafNode, 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
 

Constructor Detail

AbstractMTreeNode

public AbstractMTreeNode()
Empty constructor for Externalizable interface.


AbstractMTreeNode

public AbstractMTreeNode(PageFile<N> file,
                         int capacity,
                         boolean isLeaf,
                         Class<? super E> eclass)
Creates a new MTreeNode with the specified parameters.

Parameters:
file - the file storing the M-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

splitEntries

public N splitEntries(List<E> assignmentsToFirst,
                      List<E> assignmentsToSecond)
Splits the entries of this node into a new node at the specified splitPoint and returns the newly created node.

Parameters:
assignmentsToFirst - the assignment to this node
assignmentsToSecond - the assignment to the new node
Returns:
the newly created split node

adjustEntry

public void adjustEntry(E entry,
                        Integer routingObjectID,
                        D parentDistance,
                        AbstractMTree<O,D,N,E> mTree)
Adjusts the parameters of the entry representing this node (e.g. after insertion of new objects). Subclasses may need to overwrite this method.

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

coveringRadius

public D coveringRadius(Integer routingObjectID,
                        AbstractMTree<O,D,N,E> mTree)
Determines and returns the covering radius of this node.

Parameters:
routingObjectID - the object id of the routing object of this node
mTree - the M-Tree
Returns:
the covering radius of this node

integrityCheck

public final void integrityCheck(AbstractMTree<O,D,N,E> mTree,
                                 E entry)
Tests this node (for debugging purposes).

Parameters:
mTree - the M-Tree holding this node
entry - the entry representing this node

integrityCheckParameters

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

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.2.1 (2009-07-13_1605)