de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mkapp
Class MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.persistent.AbstractPage<N>
de.lmu.ifi.dbs.elki.index.tree.AbstractNode<N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,D,MkAppTreeNode<O,D>,MkAppEntry<D>>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mkapp.MkAppTreeNode<O,D>
- All Implemented Interfaces:
- MetricalNode<MkAppTreeNode<O,D>,MkAppEntry<D>>, Node<MkAppTreeNode<O,D>,MkAppEntry<D>>, Loggable, Page<MkAppTreeNode<O,D>>, Externalizable, Serializable
class MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>
- extends AbstractMTreeNode<O,D,MkAppTreeNode<O,D>,MkAppEntry<D>>
Represents a node in an MkApp-Tree.
- Author:
- Elke Achtert
Method Summary |
void |
adjustEntry(MkAppEntry<D> entry,
Integer routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkAppTreeNode<O,D>,MkAppEntry<D>> mTree)
Adjusts the parameters of the entry representing this node. |
protected MkAppTreeNode<O,D> |
createNewDirectoryNode(int capacity)
Creates a new directory node with the specified capacity. |
protected MkAppTreeNode<O,D> |
createNewLeafNode(int capacity)
Creates a new leaf node with the specified capacity. |
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. |
protected void |
test(MkAppEntry<D> parentEntry,
MkAppTreeNode<O,D> parent,
int index,
AbstractMTree<O,D,MkAppTreeNode<O,D>,MkAppEntry<D>> mTree)
Tests, if the parameters of the entry representing this node, are correctly set. |
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.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
MkAppTreeNode
public MkAppTreeNode()
- Empty constructor for Externalizable interface.
MkAppTreeNode
public MkAppTreeNode(PageFile<MkAppTreeNode<O,D>> file,
int capacity,
boolean isLeaf)
- Creates a MkAppTreeNode object.
- Parameters:
file
- the file storing the MCop-Treecapacity
- the capacity (maximum number of entries plus 1 for overflow) of this nodeisLeaf
- indicates wether this node is a leaf node
createNewLeafNode
protected MkAppTreeNode<O,D> 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>>,MkAppEntry<D extends NumberDistance<D>>>
- Parameters:
capacity
- the capacity of the new node
- Returns:
- a new leaf node
createNewDirectoryNode
protected MkAppTreeNode<O,D> 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>>,MkAppEntry<D extends NumberDistance<D>>>
- 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> entry,
Integer routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkAppTreeNode<O,D>,MkAppEntry<D>> mTree)
- Adjusts the parameters of the entry representing this node.
- Overrides:
adjustEntry
in class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D>,MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>,MkAppEntry<D extends NumberDistance<D>>>
- Parameters:
entry
- the entry representing this noderoutingObjectID
- the id of the (new) routing object of this nodeparentDistance
- the distance from the routing object of this node
to the routing object of the parent nodemTree
- the M-Tree object holding this node
test
protected void test(MkAppEntry<D> parentEntry,
MkAppTreeNode<O,D> parent,
int index,
AbstractMTree<O,D,MkAppTreeNode<O,D>,MkAppEntry<D>> 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:
test
in class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D>,MkAppTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>,MkAppEntry<D extends NumberDistance<D>>>
- Parameters:
parentEntry
- the entry representing the parentparent
- the parent holding the entry representing this nodeindex
- the index of the entry in the parents child arrymTree
- the M-Tree holding this node- See Also:
AbstractMTreeNode.test(de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeEntry, de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTreeNode, int, de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree)