Class MkMaxTreeNode<O>
- java.lang.Object
-
- elki.persistent.AbstractExternalizablePage
-
- elki.index.tree.AbstractNode<E>
-
- elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,MkMaxTreeNode<O>,MkMaxEntry>
-
- elki.index.tree.metrical.mtreevariants.mktrees.mkmax.MkMaxTreeNode<O>
-
- Type Parameters:
O
- the type of DatabaseObject to be stored in the MkMaxTree
- All Implemented Interfaces:
Node<MkMaxEntry>
,Page
,java.io.Externalizable
,java.io.Serializable
class MkMaxTreeNode<O> extends AbstractMTreeNode<O,MkMaxTreeNode<O>,MkMaxEntry>
Represents a node in anMkMaxTree
.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
Serial version-
Fields inherited from class elki.index.tree.AbstractNode
entries, isLeaf, numEntries
-
-
Constructor Summary
Constructors Constructor Description MkMaxTreeNode()
Empty constructor for Externalizable interface.MkMaxTreeNode(int capacity, boolean isLeaf)
Creates a new MkMaxTreeNode object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
adjustEntry(MkMaxEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,MkMaxTreeNode<O>,MkMaxEntry,?> mTree)
Calls the super method and adjust additionally the k-nearest neighbor distance of this node as the maximum of the k-nearest neighbor distances of all its entries.protected void
integrityCheckParameters(MkMaxEntry parentEntry, MkMaxTreeNode<O> parent, int index, AbstractMTree<O,MkMaxTreeNode<O>,MkMaxEntry,?> mTree)
Calls the super method and tests if the k-nearest neighbor distance of this node is correctly set.protected double
kNNDistance()
Determines and returns the k-nearest neighbor distance of this node as the maximum of the k-nearest neighbor distances 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
Serial version- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MkMaxTreeNode
public MkMaxTreeNode()
Empty constructor for Externalizable interface.
-
MkMaxTreeNode
public MkMaxTreeNode(int capacity, boolean isLeaf)
Creates a new MkMaxTreeNode 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
-
kNNDistance
protected double kNNDistance()
Determines and returns the k-nearest neighbor distance of this node as the maximum of the k-nearest neighbor distances of all entries.- Returns:
- the knn distance of this node
-
adjustEntry
public boolean adjustEntry(MkMaxEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,MkMaxTreeNode<O>,MkMaxEntry,?> mTree)
Calls the super method and adjust additionally the k-nearest neighbor distance of this node as the maximum of the k-nearest neighbor distances of all its entries.- Overrides:
adjustEntry
in classAbstractMTreeNode<O,MkMaxTreeNode<O>,MkMaxEntry>
- 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(MkMaxEntry parentEntry, MkMaxTreeNode<O> parent, int index, AbstractMTree<O,MkMaxTreeNode<O>,MkMaxEntry,?> mTree)
Calls the super method and tests if the k-nearest neighbor distance of this node is correctly set.- Overrides:
integrityCheckParameters
in classAbstractMTreeNode<O,MkMaxTreeNode<O>,MkMaxEntry>
- 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
-
-