Board logo

标题: 深入Double Array Trie [打印本页]

作者: cnangel    时间: 2009-3-31 20:53     标题: 深入Double Array Trie

原文:http://my.huhoo.net/archives/2009/04/double_array_trie.html

有兴趣的同志可以看看
作者: cnangel    时间: 2009-4-17 12:58

什么是Double Array Trie DAT结构 DAT定义  base[s] + c == t
  check[base[s] + c] == s

DAT匹配基于上述定义,DAT的匹配过程如下:假设当前状态为s,对于输入的字符c有:
  t = base[s] + c;
  if check[t] = s then
       next state = t;
  else
       fail;
  endif
DAT匹配的过程相对简单,很容易理解。
DAT构造





DAT改进方案   struct BC_st
   {   
       int base;
       int check;
   };

参考连接
作者: 贝贝    时间: 2009-4-23 10:49

我看懂了




欢迎光临 星星博客 (http://commerce.huhoo.net/) Powered by Discuz! 7.0.0