GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — GitHub - buriy/python-chartrie: Pure C character trie implementation, wrapped into python extension Folders and files
Repository files navigation============= CharTrie ============= This is pure-C version of Trie data structure: http://en.wikipedia.org/wiki/Trie , also called "prefix tree", optimized for string keys and int values. The current interface is the following:: class CharTrie: def __len__(self) def __getitem__(self, key) def __setitem__(self, key, value) def dumps(self) def debug_print(self) def find(self, key) class FrozenCharTrie: def __len__(self) def __getitem__(self, key) def loads(self, stream) def debug_print(self) def find(self, key) # -> value or None def find_prefixes(trie, key) # -> [(position1, value1), (position2, value2), ...] def find_splits(self, FrozenCharTrie suffixes, key) # -> [(position1, prefix1, suffix1), (position2, prefix2, suffix2), ...] Please note, that len(x) returns the number of chars in the trie, not the number of nodes with values. Also, only values >= 0 are supported (until version 0.2) ------------ Licence: BSD ------------ AboutPure C character trie implementation, wrapped into python extension ResourcesReleasesPackagesUsed byContributorsLanguages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||