/ To Insert an object into the current index tree. The tree is of order M = maximum number of child nodes / |
Data: The connectivity tree ; the Current index tree |
: the object to be inserted ; the cell that is occupied by the object, |
Result: The updated index tree. |
| 1: / Find the leaf node to insert the new object / |
| 2: Let |
| 3: whilep is not a leaf node do |
| 4: | Construct the set from all the RC and LE of the children of p; |
| 5: | Choose from , a cell that is nearest to the , according to ; |
| 6: | Choose a node that contains as a bound of or ; |
| 7: | Let ; |
| 8: endwhile |
| 9: /Insert the object into the leaf node p / |
| 10: if Node p is not full, i.e., number of objects is less than mthen |
| 11: | / NOTE: Add this condition to definition of Index Tree / |
| 12: | Insert into node p; |
| 13: else |
| 14: | Choose a set of existing objects in the node p, that are nearest to . |
| 15: | Call this set ; |
| 16: | Insert and into a sibling node of p; |
| 17: | Split the node, using the standard node-splitting procedure for B+Tree, and insert and into a sibling node of p; |
| 18: endif |
| 19: For nodes that contain new objects, update and |