mtree.utils
Class Insert

java.lang.Object
  extended by mtree.utils.Insert

public class Insert
extends java.lang.Object


Constructor Summary
Insert()
           
 
Method Summary
static Node deleteSlimNodes(Node n)
          Deletes empty nodes from the tree recursively (from a node n towards the root of the tree).
static Node deleteSlimNodes(Node n, java.util.Iterator<NodeEntry> nodeEntryIterator)
          Deletes empty nodes from the tree recursively (from a node n towards the root of the tree).
static LeafNode findNearestLeafList(messif.objects.LocalAbstractObject q, Node n)
          Returns a leaf which is the most convenient for inserting new object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Insert

public Insert()
Method Detail

findNearestLeafList

public static LeafNode findNearestLeafList(messif.objects.LocalAbstractObject q,
                                           Node n)
Returns a leaf which is the most convenient for inserting new object.

Returns:
a leaf which is the most convenient for inserting new object

deleteSlimNodes

public static Node deleteSlimNodes(Node n)
Deletes empty nodes from the tree recursively (from a node n towards the root of the tree). If it is necessary the root of the tree is replaced by its descendant.

Returns:
null if the root has not been replaced, otherwise a new root of the tree

deleteSlimNodes

public static Node deleteSlimNodes(Node n,
                                   java.util.Iterator<NodeEntry> nodeEntryIterator)
Deletes empty nodes from the tree recursively (from a node n towards the root of the tree). If it is necessary the root of the tree is replaced by its descendant.

Returns:
null if the root has not been replaced, otherwise a new root of the tree