摘要 |
A tree-type data structure representation method that can effectively trace relationships among data in a tree-type data structure, such as parent-child, ancestors, descendents, siblings, and generations, is provided. In a memory, data having a tree-type data structure in which unique node identifiers are assigned to nodes and a parent-child relationship between the nodes is represented by a C-P array including pairs, each pair being formed of a node identifier assigned to each of non-root nodes, which are nodes other than a root node, and a node identifier of a parent node with which each of the non-root nodes is associated is stored. In the memory, a vertex node list storing, in order to represent at least one node group, each including a specific node and a descendent node of the specific node, node identifiers of the specific nodes, which serve as vertex nodes, is also stored. A system 10 moves each of the vertex nodes to a child node, a parent node, or a node in the same generation as the vertex node (an older sibling node or a younger sibling node) by referring to the C-P array, and generates a new vertex node list.
|