Class MkCoPTreeNode<O>
- java.lang.Object
-
- elki.persistent.AbstractExternalizablePage
-
- elki.index.tree.AbstractNode<E>
-
- elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,MkCoPTreeNode<O>,MkCoPEntry>
-
- elki.index.tree.metrical.mtreevariants.mktrees.mkcop.MkCoPTreeNode<O>
-
- Type Parameters:
O
- object type
- All Implemented Interfaces:
Node<MkCoPEntry>
,Page
,java.io.Externalizable
,java.io.Serializable
class MkCoPTreeNode<O> extends AbstractMTreeNode<O,MkCoPTreeNode<O>,MkCoPEntry>
Represents a node in an MkCop-Tree.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
Serial version UID-
Fields inherited from class elki.index.tree.AbstractNode
entries, isLeaf, numEntries
-
-
Constructor Summary
Constructors Constructor Description MkCoPTreeNode()
Empty constructor for Externalizable interface.MkCoPTreeNode(int capacity, boolean isLeaf)
Creates a MkCoPTreeNode object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
adjustEntry(MkCoPEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,MkCoPTreeNode<O>,MkCoPEntry,?> mTree)
Adjusts the parameters of the entry representing this node (e.g., after insertion of new objects).protected ApproximationLine
conservativeKnnDistanceApproximation(int k_max)
Determines and returns the conservative approximation for the knn distances of this node as the maximum of the conservative approximations of all entries.protected void
integrityCheckParameters(MkCoPEntry parentEntry, MkCoPTreeNode<O> parent, int index, AbstractMTree<O,MkCoPTreeNode<O>,MkCoPEntry,?> mTree)
Tests, if the parameters of the entry representing this node, are correctly set.protected ApproximationLine
progressiveKnnDistanceApproximation(int k_max)
Determines and returns the progressive approximation for the knn distances of this node as the maximum of the progressive approximations 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 UID- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MkCoPTreeNode
public MkCoPTreeNode()
Empty constructor for Externalizable interface.
-
MkCoPTreeNode
public MkCoPTreeNode(int capacity, boolean isLeaf)
Creates a MkCoPTreeNode 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
-
conservativeKnnDistanceApproximation
protected ApproximationLine conservativeKnnDistanceApproximation(int k_max)
Determines and returns the conservative approximation for the knn distances of this node as the maximum of the conservative approximations of all entries.- Parameters:
k_max
- the maximum k parameter- Returns:
- the conservative approximation for the knn distances
-
progressiveKnnDistanceApproximation
protected ApproximationLine progressiveKnnDistanceApproximation(int k_max)
Determines and returns the progressive approximation for the knn distances of this node as the maximum of the progressive approximations of all entries.- Parameters:
k_max
- the maximum k parameter- Returns:
- the conservative approximation for the knn distances
-
adjustEntry
public boolean adjustEntry(MkCoPEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O,MkCoPTreeNode<O>,MkCoPEntry,?> 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,MkCoPTreeNode<O>,MkCoPEntry>
- 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(MkCoPEntry parentEntry, MkCoPTreeNode<O> parent, int index, AbstractMTree<O,MkCoPTreeNode<O>,MkCoPEntry,?> 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:
integrityCheckParameters
in classAbstractMTreeNode<O,MkCoPTreeNode<O>,MkCoPEntry>
- 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
-
-