struct cdawg
{
int issuffix:1;
int length:31;
char *s; // suffix if issuffix == 1, else array of valid transition chars
struct cdawg *trans; // array of next states based on the index of trans char in s, null if suffix
};
It's a trie with suffix compression to reduce the final state changes for a match, since I'd worked on something similar that, I had also considered doing that to save space. This was the solution I had thought of for the data structure, I'm interested to see if there are other approaches:
struct cdawg
{
int issuffix:1;
int length:31;
char *s; // suffix if issuffix == 1, else array of valid transition chars
struct cdawg *trans; // array of next states based on the index of trans char in s, null if suffix
};
发布评论
评论(1)
从我可以看到这篇论文
这是一个trie 使用后缀压缩来减少匹配的最终状态变化,因为我曾经做过类似的事情,所以我也考虑过这样做以节省空间。 这是我想到的数据结构的解决方案,我有兴趣看看是否还有其他方法:
From what I can see from this paper
It's a trie with suffix compression to reduce the final state changes for a match, since I'd worked on something similar that, I had also considered doing that to save space. This was the solution I had thought of for the data structure, I'm interested to see if there are other approaches: