Class AbstractMTreeNode<O,N extends AbstractMTreeNode<O,N,E>,E extends MTreeEntry>
- java.lang.Object
-
- elki.persistent.AbstractExternalizablePage
-
- elki.index.tree.AbstractNode<E>
-
- elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,N,E>
-
- Type Parameters:
O
- the type of DatabaseObject to be stored in the M-TreeN
- the type of AbstractMTreeNode used in the M-TreeE
- the type of MetricalEntry used in the M-Tree
- Direct Known Subclasses:
MkAppTreeNode
,MkCoPTreeNode
,MkMaxTreeNode
,MkTabTreeNode
,MTreeNode
public abstract class AbstractMTreeNode<O,N extends AbstractMTreeNode<O,N,E>,E extends MTreeEntry> extends AbstractNode<E>
Abstract super class for nodes in M-Tree variants.- Since:
- 0.1
- Author:
- Elke Achtert
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class elki.index.tree.AbstractNode
entries, isLeaf, numEntries
-
-
Constructor Summary
Constructors Constructor Description AbstractMTreeNode()
Empty constructor for Externalizable interface.AbstractMTreeNode(int capacity, boolean isLeaf)
Creates a new MTreeNode with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
adjustEntry(E entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,N,E,?> mTree)
Adjusts the parameters of the entry representing this node (e.g., after insertion of new objects).double
coveringRadiusFromEntries(DBID routingObjectID, AbstractMTree<O,N,E,?> mTree)
Determines and returns the covering radius of this node.protected void
integrityCheck(AbstractMTree<O,N,E,?> mTree, E entry)
Tests this node (for debugging purposes).protected void
integrityCheckParameters(E parentEntry, N parent, int index, AbstractMTree<O,N,E,?> mTree)
Tests, if the parameters of the entry representing this node, are correctly set.-
Methods inherited from class elki.index.tree.AbstractNode
addEntry, children, deleteAllEntries, deleteEntry, getCapacity, getEntry, getNumEntries, isLeaf, readExternal, removeMask, splitByMask, splitTo, splitTo, toString, writeExternal
-
Methods inherited from class elki.persistent.AbstractExternalizablePage
equals, getPageID, hashCode, isDirty, setDirty, setPageID
-
-
-
-
Constructor Detail
-
AbstractMTreeNode
public AbstractMTreeNode()
Empty constructor for Externalizable interface.
-
AbstractMTreeNode
public AbstractMTreeNode(int capacity, boolean isLeaf)
Creates a new MTreeNode with the specified parameters.- Parameters:
capacity
- the capacity (maximum number of entries plus 1 for overflow) of this nodeisLeaf
- indicates whether this node is a leaf node
-
-
Method Detail
-
adjustEntry
public boolean adjustEntry(E entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,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 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- Returns:
true
if adjustment of parent is needed
-
coveringRadiusFromEntries
public double coveringRadiusFromEntries(DBID routingObjectID, AbstractMTree<O,N,E,?> mTree)
Determines and returns the covering radius of this node.- Parameters:
routingObjectID
- the object id of the routing object of this nodemTree
- the M-Tree- Returns:
- the covering radius of this node
-
integrityCheck
protected final void integrityCheck(AbstractMTree<O,N,E,?> mTree, E entry)
Tests this node (for debugging purposes).- Parameters:
mTree
- the M-Tree holding this nodeentry
- the entry representing this node
-
integrityCheckParameters
protected void integrityCheckParameters(E parentEntry, N parent, int index, AbstractMTree<O,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 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
-
-