Lines Matching refs:trie
1 #include "trie.h"
53 marisa_trie_() : trie(), mapper() {}
55 marisa::Trie trie;
86 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags);
96 h->trie.mmap(&h->mapper, filename, offset, whence);
104 h->trie.map(ptr, size);
114 h->trie.load(filename, offset, whence);
123 h->trie.fread(file);
132 h->trie.read(fd);
142 h->trie.save(filename, trunc_flag != 0, offset, whence);
150 h->trie.fwrite(file);
158 h->trie.write(fd);
169 *key_length = h->trie.restore(key_id, key_buf, key_buf_size);
181 *key_id = h->trie.lookup(ptr);
183 *key_id = h->trie.lookup(ptr, length);
198 *num_results = h->trie.find(ptr, key_ids, key_lengths, max_num_results);
200 *num_results = h->trie.find(ptr, length,
215 *key_id = h->trie.find_first(ptr, key_length);
217 *key_id = h->trie.find_first(ptr, length, key_length);
231 *key_id = h->trie.find_last(ptr, key_length);
233 *key_id = h->trie.find_last(ptr, length, key_length);
248 h->trie.find_callback(ptr,
251 h->trie.find_callback(ptr, length,
273 *num_results = h->trie.predict_breadth_first(
276 *num_results = h->trie.predict_breadth_first(
291 *num_results = h->trie.predict_depth_first(
294 *num_results = h->trie.predict_depth_first(
310 h->trie.predict_callback(ptr,
313 h->trie.predict_callback(ptr, length,
320 return (h != NULL) ? h->trie.num_tries() : 0;
324 return (h != NULL) ? h->trie.num_keys() : 0;
328 return (h != NULL) ? h->trie.num_nodes() : 0;
332 return (h != NULL) ? h->trie.total_size() : 0;
339 h->trie.clear();