de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkcop
Class MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>
java.lang.Object
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,MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkcop.MkCoPTreeNode<O,D,N>
- All Implemented Interfaces:
- MetricalNode<MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>>, Node<MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>>, Page<MkCoPTreeNode<O,D,N>>, Externalizable, Serializable
class MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>
- extends AbstractMTreeNode<O,D,MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>>
Represents a node in an MkCop-Tree.
- Author:
- Elke Achtert
Method Summary |
void |
adjustEntry(MkCoPEntry<D,N> entry,
Integer routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>> 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 MkCoPTreeNode<O,D,N> |
createNewDirectoryNode(int capacity)
Creates a new directory node with the specified capacity. |
protected MkCoPTreeNode<O,D,N> |
createNewLeafNode(int capacity)
Creates a new leaf node with the specified capacity. |
protected void |
integrityCheckParameters(MkCoPEntry<D,N> parentEntry,
MkCoPTreeNode<O,D,N> parent,
int index,
AbstractMTree<O,D,MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>> 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 de.lmu.ifi.dbs.elki.index.tree.AbstractNode |
addDirectoryEntry, addLeafEntry, children, deleteAllEntries, deleteEntry, equals, getCapacity, getEntries, getEntry, getNumEntries, increaseEntries, isLeaf, readExternal, toString, writeExternal |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
MkCoPTreeNode
public MkCoPTreeNode()
- Empty constructor for Externalizable interface.
MkCoPTreeNode
public MkCoPTreeNode(PageFile<MkCoPTreeNode<O,D,N>> file,
int capacity,
boolean isLeaf)
- Creates a MkCoPTreeNode object.
- Parameters:
file
- the file storing the MCop-Treecapacity
- the capacity (maximum number of entries plus 1 for overflow) of this nodeisLeaf
- indicates whether this node is a leaf node
createNewLeafNode
protected MkCoPTreeNode<O,D,N> createNewLeafNode(int capacity)
- Creates a new leaf node with the specified capacity.
- Specified by:
createNewLeafNode
in class AbstractNode<MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkCoPEntry<D extends NumberDistance<D,N>,N extends Number>>
- Parameters:
capacity
- the capacity of the new node
- Returns:
- a new leaf node
createNewDirectoryNode
protected MkCoPTreeNode<O,D,N> createNewDirectoryNode(int capacity)
- Creates a new directory node with the specified capacity.
- Specified by:
createNewDirectoryNode
in class AbstractNode<MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkCoPEntry<D extends NumberDistance<D,N>,N extends Number>>
- Parameters:
capacity
- the capacity of the new node
- Returns:
- a new directory node
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 void adjustEntry(MkCoPEntry<D,N> entry,
Integer routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>> 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 class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkCoPEntry<D extends NumberDistance<D,N>,N extends Number>>
- 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
integrityCheckParameters
protected void integrityCheckParameters(MkCoPEntry<D,N> parentEntry,
MkCoPTreeNode<O,D,N> parent,
int index,
AbstractMTree<O,D,MkCoPTreeNode<O,D,N>,MkCoPEntry<D,N>> 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 class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>,MkCoPEntry<D extends NumberDistance<D,N>,N extends Number>>
- 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