-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctrie.pxd
34 lines (28 loc) · 1.26 KB
/
ctrie.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from libcpp cimport bool
cdef extern from 'wb-lhash.h' namespace 'wb':
bool LHash_IncSort[KeyT](KeyT k1, KeyT k2)
cdef extern from 'wb-trie.h' namespace 'wb':
cdef cppclass Trie[KeyT, DataT]:
Trie()
void Release()
size_t TotalMemCost()
void Clean()
void Fill(DataT d)
DataT* GetData()
bool IsDataLegal()
DataT* Find(const KeyT *p_pIndex, int nIndexLen, bool &bFound)
DataT* Insert(const KeyT *p_pIndex, int nIndexLen, bool &bFound)
Trie[KeyT, DataT] *FindTrie(const KeyT *p_pIndex, int nIndexLen, bool &bFound)
Trie[KeyT, DataT] *InsertTrie(const KeyT *p_pIndex, int nIndexLen, bool &bFound)
cdef cppclass TrieIter[KeyT, DataT]:
TrieIter(Trie[KeyT, DataT] *ptrie, bool(*sort)(KeyT, KeyT))
void Init()
Trie[KeyT, DataT] *Next(KeyT &key)
cdef cppclass TrieIter1[KeyT, DataT]:
TrieIter1(Trie[KeyT, DataT] *ptrie, KeyT *pIndex, int nLevel, bool(*sort)(KeyT, KeyT))
void Init()
Trie[KeyT, DataT] *Next(int &nLen)
cdef cppclass TrieIter2[KeyT, DataT]:
TrieIter2(Trie[KeyT, DataT] *ptrie, KeyT *pIndex, int level, bool(*sort)(KeyT, KeyT))
void Init()
Trie[KeyT, DataT] *Next()