skbio.tree.CompressedTrie

class skbio.tree.CompressedTrie(pair_list=None)[source]

A compressed Trie for a list of (key, value) pairs

Parameters:

pair_list : list of tuples, optional

List of (key, value) pairs to initialize the Trie

Attributes

size int with the number of nodes in the Trie
prefix_map Dict with the prefix map

Methods

find(key) Searches for key and returns values stored for the key.
insert(key, value) Inserts key with value in Trie