Coupled node tree splitting/conjoining method and program
First Claim
Patent Images
1. A coupled node tree splitting method comprising:
- preparing step that prepares a coupled node tree used which is in a bit string search and comprises a root node and a node pair, the node pair being a branch node and a leaf node, or a pair of branch nodes, or a pair of leaf nodes located in adjacent storage areas, whereinthe root node is a node that expresses a starting point of the tree and, which is a leaf node when there is one node in the tree and a branch node when there are two or more nodes in the tree,the branch node includes a discrimination bit position of a search key with which a bit string search is performed and position information indicating a position of a primary node, which is one node of a node pair of a link target, and the leaf node includes an index key that is a bit string that is the target of a search, and whereinrepeating linkage, at the branch node, to a primary node or a node at a position in a memory area adjacent thereto of a node pair of the link target from an arbitrary node of the tree as a searching start node in accordance with a bit value of a search key of a discrimination bit position included in the branch node, until the leaf node is reached, an index key stored in the leaf node is made a search result key, which is a search result using the search key of an arbitrary subtree having the searching start node as its root node;
a step of obtaining a split key that establishes an index key that splits a processing source coupled node tree that is to be split;
a processing source minimum value or maximum value obtaining step that determines a minimum value or a maximum value of the index keys of the processing source coupled node tree;
a comparing step of comparing the split key with either the minimum value or the maximum value and, if the minimum value is larger than the split key or if the maximum value is smaller than the split key, ending processing;
a generating step of, if the result of the comparison is that the minimum value is not larger than the split key or the maximum value is not smaller than the split key, inserting the minimum value or the maximum value index key, so as to generate a new processing target coupled node tree;
a deleting step of deleting the minimum value or maximum value index key from the processing source coupled node tree; and
whereinby making the processing source coupled node tree from which has been deleted the minimum value or maximum value index key into a new processing source coupled node tree,the processing source minimum value or maximum value obtaining step,the comparing step,the generating step,and the deleting stepare repeated until the minimum value or maximum value obtained by the processing source minimum value or maximum value obtaining step becomes larger than or smaller than the split key respectively.
2 Assignments
0 Petitions
Accused Products
Abstract
The minimum value or the maximum value of the index keys of a coupled node tree of a processing source is determined, and the index keys are successively deleted until the index key that is to be the splitting point is reached, the deleted index keys being inserted into the coupled node tree of the processing target, thereby splitting the coupled node tree. Deletion processing is done of one coupled node tree, taking as the processing source in the above-noted splitting method, and insertion processing is done of the other, taken as the processing target, thereby conjoining the coupled node trees.
16 Citations
26 Claims
-
1. A coupled node tree splitting method comprising:
-
preparing step that prepares a coupled node tree used which is in a bit string search and comprises a root node and a node pair, the node pair being a branch node and a leaf node, or a pair of branch nodes, or a pair of leaf nodes located in adjacent storage areas, wherein the root node is a node that expresses a starting point of the tree and, which is a leaf node when there is one node in the tree and a branch node when there are two or more nodes in the tree, the branch node includes a discrimination bit position of a search key with which a bit string search is performed and position information indicating a position of a primary node, which is one node of a node pair of a link target, and the leaf node includes an index key that is a bit string that is the target of a search, and wherein repeating linkage, at the branch node, to a primary node or a node at a position in a memory area adjacent thereto of a node pair of the link target from an arbitrary node of the tree as a searching start node in accordance with a bit value of a search key of a discrimination bit position included in the branch node, until the leaf node is reached, an index key stored in the leaf node is made a search result key, which is a search result using the search key of an arbitrary subtree having the searching start node as its root node; a step of obtaining a split key that establishes an index key that splits a processing source coupled node tree that is to be split; a processing source minimum value or maximum value obtaining step that determines a minimum value or a maximum value of the index keys of the processing source coupled node tree; a comparing step of comparing the split key with either the minimum value or the maximum value and, if the minimum value is larger than the split key or if the maximum value is smaller than the split key, ending processing; a generating step of, if the result of the comparison is that the minimum value is not larger than the split key or the maximum value is not smaller than the split key, inserting the minimum value or the maximum value index key, so as to generate a new processing target coupled node tree; a deleting step of deleting the minimum value or maximum value index key from the processing source coupled node tree; and
whereinby making the processing source coupled node tree from which has been deleted the minimum value or maximum value index key into a new processing source coupled node tree, the processing source minimum value or maximum value obtaining step, the comparing step, the generating step, and the deleting step are repeated until the minimum value or maximum value obtained by the processing source minimum value or maximum value obtaining step becomes larger than or smaller than the split key respectively. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A coupled node tree conjoining method comprising:
-
preparing step that prepares two coupled node trees each of which is used in a bit string search and comprises a root node and a node pair, the node pair being a branch node and leaf node, or a pair of branch nodes, or a pair of leaf nodes located in adjacent storage areas, wherein the root node is a node that expresses a starting point of the tree and, which is a leaf node when there is one node in the tree and a branch node when there are two or more nodes in the tree, the branch node includes a discrimination bit position of a search key with which a bit string search is performed and position information indicating a position of a primary node, which is one node of a node pair of a link target, and the leaf node includes an index key that is a bit string that is the target of a search, and wherein repeating linkage, at the branch node, to a primary node or a node at a position in a memory area adjacent thereto of a node pair of the link target from an arbitrary node of the tree as a searching start node in accordance with a bit value of a search key of a discrimination bit position included in the branch node, until the leaf node is reached, an index key stored in the leaf node is made a search result key, which is a search result using the search key of an arbitrary subtree having the searching start node as its root node; a processing source minimum value or maximum value obtaining step that determines a minimum value or a maximum value of the index keys of a processing source coupled node tree, that is, one of the two coupled node trees; an inserting step that inserts the minimum value or the maximum value into a processing target coupled node tree, that is, other coupled node tree of the two coupled node trees; a deleting step that deletes the minimum value or the maximum value from the processing source coupled node tree; and
whereinby making the processing source coupled node tree from which has been deleted the minimum value or maximum value index key into a new processing source coupled node tree, the processing source minimum value or maximum value obtaining step, the inserting step, and the deleting step are repeated until the processing source coupled node tree is completely deleted. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A coupled node tree splitting method comprising:
-
preparing step that prepares a coupled node tree which is used in a bit string search and comprises a root node and a node pair, the node pair being a branch node and a leaf node, or a pair of branch nodes, or a pair of leaf nodes located in adjacent storage areas, wherein the root node is a node that expresses a starting point of the tree and, which is a leaf node when there is one node in the tree and a branch node when there are two or more nodes in the tree, the branch node includes a discrimination bit position of a search key with which a bit string search is performed and position information indicating a position of a primary node, which is one node of a node pair of a link target, and the leaf node includes an index key that is a bit string that is the target of a search, and wherein repeating linkage, at the branch node, to a primary node or a node at a position in a memory area adjacent thereto of a node pair of the link target from an arbitrary node of the tree as a searching start node in accordance with a bit value of a search key of a discrimination bit position included in the branch node, until the leaf node is reached, an index key stored in the leaf node is made a search result key, which is a search result using the search key of an arbitrary subtree having the searching start node as its root node; a step of obtaining a split key that splits a processing source coupled node tree that is to be split; a split node obtaining step that determines a split node, which is the root node of a largest subtree of processing source subtrees having the split key as a maximum value or a minimum value; a generating step that generates a new processing target coupled node tree by inserting a split node tree that is a subtree having the split node as the root node; and a deleting step that deletes the split node tree from the processing source coupled node tree. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
-
-
21. A coupled node tree conjoining method comprising:
-
preparing step that prepares two coupled node trees each of which is used in a bit string search and comprises a root node and a node pair, the node pair being a branch node and leaf node, or a pair of branch nodes, or a pair of leaf nodes located in adjacent storage areas, wherein the root node is a node that expresses a starting point of the tree and, which is a leaf node when there is one node in the tree and a branch node when there are two or more nodes in the tree, the branch node includes a discrimination bit position of a search key with which a bit string search is performed and position information indicating a position of a primary node, which is one node of a node pair of a link target, and the leaf node includes an index key that is a bit string that is the target of a search, and wherein repeating linkage, at the branch node, to a primary node or a node at a position in a memory area adjacent thereto of a node pair of the link target from an arbitrary node of the tree as a searching start node in accordance with a bit value of a search key of a discrimination bit position included in the branch node, until the leaf node is reached, an index key stored in the leaf node is made a search result key, which is a search result using the search key of an arbitrary subtree having the searching start node as its root node; a processing source maximum value or minimum value obtaining step that determines a maximum value or a minimum value of the index keys of a processing source coupled node tree, that is, one of two coupled node trees; a processing target minimum value or maximum value obtaining step that determines a minimum value or a maximum value of the index keys of a processing target coupled node tree, that is, another of two coupled node trees; a difference bit position obtaining step that determines a difference bit position between the maximum value of the index keys of the processing source coupled node tree determined by the processing source maximum value or minimum value obtaining step and the minimum value of the index keys of the processing target coupled node tree determined by the processing target minimum value or maximum value obtaining step or between the minimum value of the index keys of the processing source coupled node tree determined by the processing source maximum value or minimum value obtaining step and the maximum value of the index keys of the processing target coupled node tree determined by the processing target minimum value or maximum value obtaining step; a split/conjoin node obtaining step that determines a split/conjoin node, which is the root node of a subtree that is to be split from the processing source coupled node tree and conjoined to the processing target coupled node tree, based on the difference bit position obtained by the difference bit position obtaining step; a conjoining position obtaining step that determines a processing target conjoining position for conjoining the split/conjoin node determined by the split/conjoin node obtaining step, based on the difference bit position determined by the difference bit position obtaining step; an inserting step that inserts the split/conjoin node determined by the split/conjoin node obtaining step at the processing target conjoining position determined by the conjoining position obtaining step; and a deleting step that deletes the split/conjoin node determined by the split/conjoin node obtaining step from the processing source coupled node tree. - View Dependent Claims (22, 23, 24, 25, 26)
-
Specification