摘要
在编制汉字输入法的过程中遇到了字符串的存储和检索问题,对此提出了一种基于有序二叉树的高效优化索引树,给出了优化索引树的生成算法和搜索算法。在该高效优化索引树中,采用特定的非定长结构存储树节点,并把索引树存放在一个字节型逻辑数组中,从而大大减少了索引树中儿子指针和兄弟指针的个数,使得索引树中不存在空指针。优化后的索引树不仅占用存储空间少,而且检索速度极快,非常适合存储编码信息。
Encountered string retrieval while programming an input method editor of Chinese character.Thus have proposed an efficient optimized trie-tree based on ordered binary tree.By using special structure as the trie-tree node's memory structure and putting the trie-tree in a byte logic array,got an optimized trie-tree which avoided null pointer.The optimized trie-tree have the merits of low memory space and rapid tree traversal.In this paper,also presented the algorithms of building and retrieval of the optimized trie-tree in detail.
出处
《微机发展》
2004年第4期18-21,24,共5页
Microcomputer Development