- sdatrie.ts
- static double array
- ddatrie.ts
- dynamic double array(coming soon)
///<reference path="sdatrie.ts" />
var keys = ['aa', 'ab', 'bb', 'bc']; //keys must be sorted alphabetically
var results = [1, 2, 3, 4]; //results are values corresponding to keys
var datrie = new DATrie.StaticDoubleArrayTrieImpl<number>();
datrie.build(keys, results);
var r = datrie.commonPrefixSearch('a'); //return [1, 2]
var e = datrie.exactMatchSearch('aa'); //return 1
$ karma start
$ npm install datrie4ts
Takayuki Hasegawa takayuki.hasegawa0311@gmail.com