Skip to content

hase1031/datrie4ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datrie4ts

About

Double Array Trie written in TypeScript

  • sdatrie.ts
    • static double array
  • ddatrie.ts
    • dynamic double array(coming soon)

Usage

///<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

Test

$ karma start

Install

$ npm install datrie4ts

Author

Takayuki Hasegawa takayuki.hasegawa0311@gmail.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published