Class MkTabTreeNode<O>
- java.lang.Object
-
- elki.persistent.AbstractExternalizablePage
-
- elki.index.tree.AbstractNode<E>
-
- elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,MkTabTreeNode<O>,MkTabEntry>
-
- elki.index.tree.metrical.mtreevariants.mktrees.mktab.MkTabTreeNode<O>
-
- Type Parameters:
O
- object type
- All Implemented Interfaces:
Node<MkTabEntry>
,Page
,java.io.Externalizable
,java.io.Serializable
class MkTabTreeNode<O> extends AbstractMTreeNode<O,MkTabTreeNode<O>,MkTabEntry>
Represents a node in a MkMax-Tree.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Fields inherited from class elki.index.tree.AbstractNode
entries, isLeaf, numEntries
-
-
Constructor Summary
Constructors Constructor Description MkTabTreeNode()
Empty constructor for Externalizable interface.MkTabTreeNode(int capacity, boolean isLeaf)
Creates a MkTabTreeNode object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
adjustEntry(MkTabEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,MkTabTreeNode<O>,MkTabEntry,?> mTree)
Adjusts the parameters of the entry representing this node (e.g., after insertion of new objects).protected void
integrityCheckParameters(MkTabEntry parentEntry, MkTabTreeNode<O> parent, int index, AbstractMTree<O,MkTabTreeNode<O>,MkTabEntry,?> mTree)
Tests, if the parameters of the entry representing this node, are correctly set.protected double[]
kNNDistances()
Determines and returns the knn distance of this node as the maximum knn distance of all entries.-
Methods inherited from class elki.index.tree.metrical.mtreevariants.AbstractMTreeNode
coveringRadiusFromEntries, integrityCheck
-
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MkTabTreeNode
public MkTabTreeNode()
Empty constructor for Externalizable interface.
-
MkTabTreeNode
public MkTabTreeNode(int capacity, boolean isLeaf)
Creates a MkTabTreeNode object.- 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
-
kNNDistances
protected double[] kNNDistances()
Determines and returns the knn distance of this node as the maximum knn distance of all entries.- Returns:
- the knn distance of this node
-
adjustEntry
public boolean adjustEntry(MkTabEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,MkTabTreeNode<O>,MkTabEntry,?> mTree)
Description copied from class:AbstractMTreeNode
Adjusts the parameters of the entry representing this node (e.g., after insertion of new objects). Subclasses may need to overwrite this method.- Overrides:
adjustEntry
in classAbstractMTreeNode<O,MkTabTreeNode<O>,MkTabEntry>
- 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
-
integrityCheckParameters
protected void integrityCheckParameters(MkTabEntry parentEntry, MkTabTreeNode<O> parent, int index, AbstractMTree<O,MkTabTreeNode<O>,MkTabEntry,?> mTree)
Tests, if the parameters of the entry representing this node, are correctly set. Subclasses may need to overwrite this method.- Overrides:
integrityCheckParameters
in classAbstractMTreeNode<O,MkTabTreeNode<O>,MkTabEntry>
- Parameters:
parent
- the parent holding the entry representing this nodeindex
- the index of the entry in the parents child arraymTree
- the underlying M-TreeparentEntry
- the entry representing the parent
-
-