文件名称:mmtrie
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 5kb
- 下载次数:
- 0次
- 提 供 者:
- 王*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
写这个的出发点是吧之前做的trie能写到文件而且能很容易mmap到内存, 可以用于输入法 搜索引擎分词 词表的功能, 共享前缀存储, 支持最大20亿节点.
简单一点可以当一个hash表使用, 查找的时间复杂度为 N* Log(256) N为字符长度, key可以为二进制的数据, value 必须为int类型, 不能为0, 因为mmtrie_get()/find() 没有结果的情况下为0,
如果需要set value为0的话自己+1, 出来的时候-1就好了.-Write the starting point is to do the trie before it can write files and can very easily mmap to memory, can be used to enter France search engine sub-word vocabulary, shared storage prefix supports up to two billion nodes. A simple thing can be when a Use hash table to find the time complexity is N* Log (256) N for the characters in length, key data for binary, value must be int type, can not be 0, because mmtrie_get ()/find () does not result in the situation is 0, if set value to 0 if its+1, out of time-1 enough.
简单一点可以当一个hash表使用, 查找的时间复杂度为 N* Log(256) N为字符长度, key可以为二进制的数据, value 必须为int类型, 不能为0, 因为mmtrie_get()/find() 没有结果的情况下为0,
如果需要set value为0的话自己+1, 出来的时候-1就好了.-Write the starting point is to do the trie before it can write files and can very easily mmap to memory, can be used to enter France search engine sub-word vocabulary, shared storage prefix supports up to two billion nodes. A simple thing can be when a Use hash table to find the time complexity is N* Log (256) N for the characters in length, key data for binary, value must be int type, can not be 0, because mmtrie_get ()/find () does not result in the situation is 0, if set value to 0 if its+1, out of time-1 enough.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
mmtrie.c
mmtrie.h
mmtrie.h