0
Trie树<br />
Outline<br />何为Trie树<br />双数组Trie树<br />中文搜索算法中的XTrie<br />Xtrie的数据构造与测试<br />
何为Retrieval树<br />
何为Trie树<br />B, B- , B+, B*<br />Hash<br />Trie<br />加法hash<br />
双数组Trie<br />为什么要使用双数组Trie<br />状态机<br />
双数组Trie—Structure&Walking<br />
双数组Trie—Construction<br />
双数组Trie—Suffix Compression<br />
双数组Trie—Key Insertion<br />When the branching point is in the double-array structure<br />When the branching point is in t...
双数组Trie—Key Deletion<br />Delete k = a1a2...ah-1ah...an, a1a2...ah-1是在双数组结构中,且ah...an在tail pool中<br />
双数组Trie—example<br />bachelor<br />jar<br />badge<br />baby<br />
搜索算法中的XTrie<br />class Dict<br />class DoubleArrayTrie<br />class DADLTrie (Double Array Double Linkedlist) (充分利用空闲单元,而使用了...
中文搜索算法中的XTrie<br />参考Trie.cpp<br />深度优先搜索<br />
Xtrie的数据构造与测试<br />
Xtrie的数据构造与测试<br />
Xtrie的数据构造与测试<br />
Xtrie的数据构造与测试<br />bed<br />beg<br />baby<br />book<br />edit<br />beld<br />bold<br />插入重复的key<br />插入超长的key<br />插入超大数据量...
了解数据结构的相应算法
数据结构覆盖
Upcoming SlideShare
Loading in...5
×

Trie树分享

1,595

Published on

Trie树分享

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,595
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Trie树分享"

  1. 1. Trie树<br />
  2. 2. Outline<br />何为Trie树<br />双数组Trie树<br />中文搜索算法中的XTrie<br />Xtrie的数据构造与测试<br />
  3. 3. 何为Retrieval树<br />
  4. 4. 何为Trie树<br />B, B- , B+, B*<br />Hash<br />Trie<br />加法hash<br />
  5. 5. 双数组Trie<br />为什么要使用双数组Trie<br />状态机<br />
  6. 6. 双数组Trie—Structure&Walking<br />
  7. 7. 双数组Trie—Construction<br />
  8. 8. 双数组Trie—Suffix Compression<br />
  9. 9. 双数组Trie—Key Insertion<br />When the branching point is in the double-array structure<br />When the branching point is in the tail pool<br />
  10. 10. 双数组Trie—Key Deletion<br />Delete k = a1a2...ah-1ah...an, a1a2...ah-1是在双数组结构中,且ah...an在tail pool中<br />
  11. 11. 双数组Trie—example<br />bachelor<br />jar<br />badge<br />baby<br />
  12. 12. 搜索算法中的XTrie<br />class Dict<br />class DoubleArrayTrie<br />class DADLTrie (Double Array Double Linkedlist) (充分利用空闲单元,而使用了双向链表)<br />class DoubleTrie (双向Trie)<br />class Xtrie<br />m_pTrie = new b2bmlr::DoubleTrie();<br />m_pTrie->add((b2bmlr::DictKeyT*)pKey, nKeyLen, m_nDateSize + 1);<br />intnOffset = m_pTrie->match((b2bmlr::DictKeyT*)pKey, nKeyLen);<br />
  13. 13. 中文搜索算法中的XTrie<br />参考Trie.cpp<br />深度优先搜索<br />
  14. 14. Xtrie的数据构造与测试<br />
  15. 15. Xtrie的数据构造与测试<br />
  16. 16. Xtrie的数据构造与测试<br />
  17. 17. Xtrie的数据构造与测试<br />bed<br />beg<br />baby<br />book<br />edit<br />beld<br />bold<br />插入重复的key<br />插入超长的key<br />插入超大数据量的key<br />……<br />针对数据结构的测试:<br /><ul><li>了解数据结构本身
  18. 18. 了解数据结构的相应算法
  19. 19. 数据结构覆盖
  20. 20. 算法路径覆盖</li></li></ul><li>参考文献<br />An Implementation of Double-Array Trie<br />[Aoe1989] Aoe, J. An Efficient Digital Search Algorithm by Using a Double-Array Structure. IEEE Transactions on Software Engineering. Vol. 15, 9 (Sep 1989). pp. 1066-1077.<br />
  21. 21. Q&A<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×