|
| Trie () |
|
| ~Trie () |
|
void | Release () |
| Release all the trie. More...
|
|
size_t | TotalMemCost () |
| Compute the total memory cost of the trie structure. More...
|
|
void | Clean () |
| Clean. More...
|
|
void | Fill (DataT d) |
| set all the values to d More...
|
|
DataT * | GetData () |
| Get value. More...
|
|
_wb_LHASH_FOR_TRIE * | GetHash () const |
| Get hash pointer. More...
|
|
bool | IsDataLegal () |
| detect if current trie have legal value More...
|
|
DataT * | Find (const KeyT *p_pIndex, int nIndexLen, bool &bFound) |
| Find a value. More...
|
|
DataT * | Insert (const KeyT *p_pIndex, int nIndexLen, bool &bFound) |
| Insert a value. More...
|
|
_wb_TRIE * | FindTrie (const KeyT *p_pIndex, int nIndexLen, bool &bFound) |
| Find a sub-trie. More...
|
|
_wb_TRIE * | InsertTrie (const KeyT *p_pIndex, int nIndexLen, bool &bFound) |
| Insert a sub-trie. More...
|
|
DataT * | Find (const KeyT *p_pIndex, int nIndexLen) |
| Find a value. More...
|
|
DataT * | Insert (const KeyT *p_pIndex, int nIndexLen) |
| Insert a value. More...
|
|
_wb_TRIE * | FindTrie (const KeyT *p_pIndex, int nIndexLen) |
| Find a sub-trie. More...
|
|
_wb_TRIE * | InsertTrie (const KeyT *p_pIndex, int nIndexLen) |
| Insert a sub-trie. More...
|
|
template<class KeyT, class DataT>
class wb::Trie< KeyT, DataT >
trie structure
Trie��ʹ����һ����Ҫע������⣺ ��������һ����״�ṹ����ˣ�����߽�index�������ͽڵ㣬�磺����abc��������a��ab�ڵ㣬���ʹ��Find��Insert�����Żص� bFoundΪtrue�����Ⲣ����ζ�����Dz����a��ab�������ȷ���ж��Ƿ����ķ���Ϊ��
DataT *p = trie.Find(index, len);
if ( !p ) {
*trie.Insert(index, len) = %��һ��ֵ%
%û�г���%
} else {
%���%
}
��ΪFind�������жϵ�ǰ�ڵ㴦����ֵ�Ƿ���ֵ��������ֵ����Ż���ָ�룻������NULL
Definition at line 40 of file wb-trie.h.