diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-12-02 01:45:21 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-12-02 02:42:50 +0300 |
commit | 9c43d58f75cf086b744cf4fe2ae180e8f37e4a0c (patch) | |
tree | 9f88a486917d371d099cd712efd91b4c122d209d /contrib/python/marisa-trie/trie.pxd | |
parent | 32fb6dda1feb24f9ab69ece5df0cb9ec238ca5e6 (diff) | |
download | ydb-9c43d58f75cf086b744cf4fe2ae180e8f37e4a0c.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/marisa-trie/trie.pxd')
-rw-r--r-- | contrib/python/marisa-trie/trie.pxd | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/contrib/python/marisa-trie/trie.pxd b/contrib/python/marisa-trie/trie.pxd new file mode 100644 index 0000000000..f525caf8ad --- /dev/null +++ b/contrib/python/marisa-trie/trie.pxd @@ -0,0 +1,41 @@ +cimport agent +cimport base +cimport keyset + + +cdef extern from "<marisa/trie.h>" namespace "marisa" nogil: + + cdef cppclass Trie: + Trie() + + void build(keyset.Keyset &keyset, int config_flags) except + + void build(keyset.Keyset &keyset) except + + + void mmap(char *filename) except + + void map(void *ptr, int size) except + + + void load(char *filename) except + + void read(int fd) except + + + void save(char *filename) except + + void write(int fd) except + + + bint lookup(agent.Agent &agent) except + + void reverse_lookup(agent.Agent &agent) except +KeyError + bint common_prefix_search(agent.Agent &agent) except + + bint predictive_search(agent.Agent &agent) except + + + int num_tries() except + + int num_keys() except + + int num_nodes() except + + + base.TailMode tail_mode() + base.NodeOrder node_order() + + bint empty() except + + int size() except + + int total_size() except + + int io_size() except + + + void clear() except + + void swap(Trie &rhs) except + |