de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkmax
Class MkMaxTreeNode<O,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.persistent.AbstractPage
de.lmu.ifi.dbs.elki.index.tree.AbstractNode<E>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTreeNode<O,D,MkMaxTreeNode<O,D>,MkMaxEntry<D>>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkmax.MkMaxTreeNode<O,D>
- Type Parameters:
O
- the type of DatabaseObject to be stored in the MkMaxTreeD
- the type of Distance used in the MkMaxTree
- All Implemented Interfaces:
- Node<MkMaxEntry<D>>, Page, Externalizable, Serializable
class MkMaxTreeNode<O,D extends Distance<D>>
- extends AbstractMTreeNode<O,D,MkMaxTreeNode<O,D>,MkMaxEntry<D>>
Represents a node in an MkMaxTree
.
Constructor Summary |
MkMaxTreeNode()
Empty constructor for Externalizable interface. |
MkMaxTreeNode(int capacity,
boolean isLeaf)
Creates a new MkMaxTreeNode object. |
Method Summary |
void |
adjustEntry(MkMaxEntry<D> entry,
DBID routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkMaxTreeNode<O,D>,MkMaxEntry<D>> 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<D> parentEntry,
MkMaxTreeNode<O,D> parent,
int index,
AbstractMTree<O,D,MkMaxTreeNode<O,D>,MkMaxEntry<D>> mTree)
Calls the super method and tests if the k-nearest neighbor distance of this
node is correctly set. |
protected D |
kNNDistance(DistanceQuery<O,D> distanceFunction)
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 de.lmu.ifi.dbs.elki.index.tree.AbstractNode |
addDirectoryEntry, addLeafEntry, children, deleteAllEntries, deleteEntry, equals, getCapacity, getEntries, getEntry, getNumEntries, isLeaf, readExternal, splitTo, splitTo, toString, writeExternal |
serialVersionUID
private static final long serialVersionUID
- Serial version
- See Also:
- Constant Field Values
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
kNNDistance
protected D kNNDistance(DistanceQuery<O,D> distanceFunction)
- Determines and returns the k-nearest neighbor distance of this node as the
maximum of the k-nearest neighbor distances of all entries.
- Parameters:
distanceFunction
- the distance function
- Returns:
- the knn distance of this node
adjustEntry
public void adjustEntry(MkMaxEntry<D> entry,
DBID routingObjectID,
D parentDistance,
AbstractMTree<O,D,MkMaxTreeNode<O,D>,MkMaxEntry<D>> 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 class AbstractMTreeNode<O,D extends Distance<D>,MkMaxTreeNode<O,D extends Distance<D>>,MkMaxEntry<D extends Distance<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
integrityCheckParameters
protected void integrityCheckParameters(MkMaxEntry<D> parentEntry,
MkMaxTreeNode<O,D> parent,
int index,
AbstractMTree<O,D,MkMaxTreeNode<O,D>,MkMaxEntry<D>> mTree)
- Calls the super method and tests if the k-nearest neighbor distance of this
node is correctly set.
- Overrides:
integrityCheckParameters
in class AbstractMTreeNode<O,D extends Distance<D>,MkMaxTreeNode<O,D extends Distance<D>>,MkMaxEntry<D extends Distance<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