Lines Matching refs:trie
53 marisa_trie_() : trie(), mapper() {} in marisa_trie_()
55 marisa::Trie trie; member
86 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags); in marisa_build()
96 h->trie.mmap(&h->mapper, filename, offset, whence); in marisa_mmap()
104 h->trie.map(ptr, size); in marisa_map()
114 h->trie.load(filename, offset, whence); in marisa_load()
123 h->trie.fread(file); in marisa_fread()
132 h->trie.read(fd); in marisa_read()
142 h->trie.save(filename, trunc_flag != 0, offset, whence); in marisa_save()
150 h->trie.fwrite(file); in marisa_fwrite()
158 h->trie.write(fd); in marisa_write()
169 *key_length = h->trie.restore(key_id, key_buf, key_buf_size); in marisa_restore()
181 *key_id = h->trie.lookup(ptr); in marisa_lookup()
183 *key_id = h->trie.lookup(ptr, length); in marisa_lookup()
198 *num_results = h->trie.find(ptr, key_ids, key_lengths, max_num_results); in marisa_find()
200 *num_results = h->trie.find(ptr, length, in marisa_find()
215 *key_id = h->trie.find_first(ptr, key_length); in marisa_find_first()
217 *key_id = h->trie.find_first(ptr, length, key_length); in marisa_find_first()
231 *key_id = h->trie.find_last(ptr, key_length); in marisa_find_last()
233 *key_id = h->trie.find_last(ptr, length, key_length); in marisa_find_last()
248 h->trie.find_callback(ptr, in marisa_find_callback()
251 h->trie.find_callback(ptr, length, in marisa_find_callback()
273 *num_results = h->trie.predict_breadth_first( in marisa_predict_breadth_first()
276 *num_results = h->trie.predict_breadth_first( in marisa_predict_breadth_first()
291 *num_results = h->trie.predict_depth_first( in marisa_predict_depth_first()
294 *num_results = h->trie.predict_depth_first( in marisa_predict_depth_first()
310 h->trie.predict_callback(ptr, in marisa_predict_callback()
313 h->trie.predict_callback(ptr, length, in marisa_predict_callback()
320 return (h != NULL) ? h->trie.num_tries() : 0; in marisa_get_num_tries()
324 return (h != NULL) ? h->trie.num_keys() : 0; in marisa_get_num_keys()
328 return (h != NULL) ? h->trie.num_nodes() : 0; in marisa_get_num_nodes()
332 return (h != NULL) ? h->trie.total_size() : 0; in marisa_get_total_size()
339 h->trie.clear(); in marisa_clear()