Inserting method based on tree-shaped data structure node and storing device

Inserting method based on tree-shaped data structure node and storing device

  • CN 101,515,298 A
  • Filed: 03/30/2009
  • Published: 08/26/2009
  • Est. Priority Date: 03/30/2009
  • Status: Active Application
First Claim
Patent Images

1. , a kind of insertion method based on tree-shaped data structure node is characterized in that, comprising:

  • In main tree, search nearest main tree node according to the key value of node to be inserted, the key value of described nearest main tree node less than and the key value of approaching node to be inserted;

    The root node of described main tree is initialized as has minimum key value;

    Wherein, described main tree comprises the left child node of father node, described father node and the right child node of described father node, and described left child node is greater than described father node, and described father node is greater than described right child node;

    With the outside pointed of nearest main tree node from tree as current from tree, judge current whether full from setting,If, then from tree, select a node as splitting node arbitrarily current, to split node is inserted in the main tree as newly-built main tree node, for newly-built main tree node distributes newly-built from tree, and it is the outside pointed of newly-built main tree node is newly-built from tree, move the current whole nodes that split the node left side that from tree, are arranged in newly-built, carry out then and search nearest main tree node from treeIf not, then node to be inserted is inserted into current from the tree.

View all claims
    ×
    ×

    Thank you for your feedback

    ×
    ×