de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mkcop
Class MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
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>,MkCoPEntry<D>>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mkcop.MkCoPTreeNode<O,D>
- All Implemented Interfaces:
- MetricalNode<MkCoPTreeNode<O,D>,MkCoPEntry<D>>, Node<MkCoPTreeNode<O,D>,MkCoPEntry<D>>, Loggable, Page<MkCoPTreeNode<O,D>>, Externalizable, Serializable
class MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>
- extends AbstractMTreeNode<O,D,MkCoPTreeNode<O,D>,MkCoPEntry<D>>
Represents a node in an MkCop-Tree.
- Author:
- Elke Achtert
Method Summary |
void |
adjustEntry(MkCoPEntry<D> entry,
Integer routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkCoPTreeNode<O,D>,MkCoPEntry<D>> mTree)
Adjusts the parameters of the entry representing this node. |
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> |
createNewDirectoryNode(int capacity)
Creates a new directory node with the specified capacity. |
protected MkCoPTreeNode<O,D> |
createNewLeafNode(int capacity)
Creates a new leaf node with the specified capacity. |
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. |
protected void |
test(MkCoPEntry<D> parentEntry,
MkCoPTreeNode<O,D> parent,
int index,
AbstractMTree<O,D,MkCoPTreeNode<O,D>,MkCoPEntry<D>> mTree)
Tests, if the parameters of the entry representing this node, are correctly set. |
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 |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
MkCoPTreeNode
public MkCoPTreeNode()
- Empty constructor for Externalizable interface.
MkCoPTreeNode
public MkCoPTreeNode(PageFile<MkCoPTreeNode<O,D>> 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 wether this node is a leaf node
createNewLeafNode
protected MkCoPTreeNode<O,D> 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>>,MkCoPEntry<D extends NumberDistance<D>>>
- Parameters:
capacity
- the capacity of the new node
- Returns:
- a new leaf node
createNewDirectoryNode
protected MkCoPTreeNode<O,D> 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>>,MkCoPEntry<D extends NumberDistance<D>>>
- 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> entry,
Integer routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkCoPTreeNode<O,D>,MkCoPEntry<D>> mTree)
- Description copied from class:
AbstractMTreeNode
- Adjusts the parameters of the entry representing this node.
- Overrides:
adjustEntry
in class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D>,MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>,MkCoPEntry<D extends NumberDistance<D>>>
- 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- See Also:
AbstractMTreeNode.adjustEntry(de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeEntry, Integer, de.lmu.ifi.dbs.elki.distance.Distance, de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree)
test
protected void test(MkCoPEntry<D> parentEntry,
MkCoPTreeNode<O,D> parent,
int index,
AbstractMTree<O,D,MkCoPTreeNode<O,D>,MkCoPEntry<D>> 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:
test
in class AbstractMTreeNode<O extends DatabaseObject,D extends NumberDistance<D>,MkCoPTreeNode<O extends DatabaseObject,D extends NumberDistance<D>>,MkCoPEntry<D extends NumberDistance<D>>>
- 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- See Also:
AbstractMTreeNode.test(de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.MTreeEntry, AbstractMTreeNode, int, de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree)