文件名称:ternary-search-tree:超快速前缀自动完成树
文件大小:3.25MB
文件格式:ZIP
更新时间:2024-06-03 22:13:57
JavaScript
三元前缀搜索树 受到此处的c#实现的启发: : 纯JavaScript实现,允许将字符串加载到树中,然后快速搜索给定的前缀。 简单工作台: clone npm install cd src node --expose-gc bench.js bench.js将加载Shakespear(will.json)的全部作品,将其索引到树中,然后执行前缀搜索。 搜索结果应在1毫秒内完成。 *注意:暴露基准仅适用于基准标记脚本,代码可移植到节点,Web和Rplus 运行测试: gulp test 用法: 构造: var tree = new Tree ( ) ; //case insensitive var tree = new Tree ( true ) ; //case sensitive 添加: tree.add("Some string", {some:da
【文件预览】:
ternary-search-tree-master
----package.json(410B)
----will.json(24.9MB)
----tests()
--------tests.js(7KB)
----src()
--------index.js(4KB)
--------bench.js(1KB)
----.gitignore(27B)
----README.md(3KB)
----GulpFile.js(272B)