libsent/include/sent/ptree.h

データ検索用汎用パトリシア検索木の定義 [詳細]

このグラフは、どのファイルから直接、間接的にインクルードされているかを示しています。

ソースコードを見る。

データ構造

struct  _apatnode
 Patricia binary tree node, to search related pointer from string [詳細]
struct  _patnode
 Another patricia binary tree node, to search integer value from string [詳細]

型定義

typedef _apatnode APATNODE
 Patricia binary tree node, to search related pointer from string
typedef _patnode PATNODE
 Another patricia binary tree node, to search integer value from string

関数

int testbit (char *str, int bitplace)
int where_the_bit_differ (char *str1, char *str2)
PATNODE * make_ptree (char **words, int *data, int wordsnum, int bitplace)
void disp_ptree (PATNODE *node, int level)
int ptree_search_data (char *str, PATNODE *rootnode)
PATNODE * ptree_make_root_node (int data)
void ptree_add_entry (char *str, int data, char *matchstr, PATNODE **rootnode)
void free_ptree (PATNODE *rootnode)
void * aptree_search_data (char *str, APATNODE *rootnode)
APATNODE * aptree_make_root_node (void *data)
void aptree_add_entry (char *str, void *data, char *matchstr, APATNODE **rootnode)
void aptree_remove_entry (char *str, APATNODE **rootnode)
void aptree_traverse_and_do (APATNODE *node, void(*callback)(void *))
void free_aptree (APATNODE *rootnode)


説明

データ検索用汎用パトリシア検索木の定義

作者:
Akinobu LEE
日付:
Fri Feb 11 17:27:24 2005
文字列からその名前を持つ構造体や対応するIDを検索するための パトリシア木の構造体です.

Revision
1.3

ptree.h で定義されています。


関数

int testbit ( char *  str,
int  bitplace 
)

String bit test function.

引数:
str [in] key string
bitplace [in] bit location to test
戻り値:
the content of tested bit in tmp_str, either 0 or 1.

ptree.c の 36 行で定義されています。

参照元 aptree_add_entry_at()・make_ptree()・ptree_add_entry_at()・where_the_bit_differ().

int where_the_bit_differ ( char *  str1,
char *  str2 
)

Find in which bit the two strings differ, starting from the head.

引数:
str1 [in] string 1
str2 [in] string 2
戻り値:
the bit location in which the string differs.

ptree.c の 61 行で定義されています。

参照元 aptree_add_entry()・ptree_add_entry().

PATNODE* make_ptree ( char **  words,
int *  data,
int  wordsnum,
int  bitplace 
)

Make a patricia tree for given string arrays. Recursively called by descending the scan bit.

引数:
words [in] list of word strings
data [in] integer value corresponding to each string in words
wordsnum [in] number of above
bitplace [in] current scan bit.
戻り値:
pointer to the root node index.

ptree.c の 105 行で定義されています。

参照元 make_ptree()・ngram_make_lookup_tree().

void disp_ptree ( PATNODE *  node,
int  level 
)

Output a tree structure in text for debug, traversing pre-order

引数:
node [in] root index node
level [in] current tree depth

ptree.c の 168 行で定義されています。

int ptree_search_data ( char *  str,
PATNODE *  node 
)

Search for the data whose key string matches the given string.

引数:
str [in] search key string
node [in] root node of index tree
戻り値:
the exactly found integer value, or the nearest one.

ptree.c の 246 行で定義されています。

参照元 ngram_lookup_word()・set_unigram().

PATNODE* ptree_make_root_node ( int  data  ) 

Make a root node of a index tree.

引数:
data [in] the first data
戻り値:
the newly allocated root node.

ptree.c の 268 行で定義されています。

参照元 ptree_add_entry()・set_unigram().

void ptree_add_entry ( char *  str,
int  data,
char *  matchstr,
PATNODE **  rootnode 
)

Insert a new node to the index tree.

引数:
str [in] new key string
data [in] new data integer value
matchstr [in] the most matching data already exist in the index tree, as obtained by aptree_search_data()
rootnode [i/o] pointer to root index node

ptree.c の 326 行で定義されています。

参照元 set_unigram().

void free_ptree ( PATNODE *  node  ) 

Free all the sub nodes from specified node.

引数:
node [in] current node.

ptree.c の 345 行で定義されています。

参照元 free_ptree()・ngram_info_free().

void* aptree_search_data ( char *  str,
APATNODE *  node 
)

Search for the data whose key string matches the given string.

引数:
str [in] search key string
node [in] root node of index tree
戻り値:
the exactly found data pointer, or the nearest one.

aptree.c の 103 行で定義されています。

参照元 add_to_error()・cdset_lookup()・codebook_add()・codebook_lookup()・dens_add()・dens_lookup()・hmm_add_physical_to_logical()・hmm_add_pseudo_phones_sub()・htk_hmmdata_add()・htk_hmmdata_lookup_logical()・htk_hmmdata_lookup_physical()・make_hmm_basephone_list()・mark_word_edge()・new_str2phseq()・rdhmmlist()・regist_cdset()・remove_cdset()・state_add()・state_lookup()・trans_add()・trans_lookup()・var_add()・var_lookup().

APATNODE* aptree_make_root_node ( void *  data  ) 

Make a root node of a index tree.

引数:
data [in] the first data
戻り値:
the newly allocated root node.

aptree.c の 125 行で定義されています。

参照元 add_to_error()・aptree_add_entry()・codebook_add()・dens_add()・hmm_add_physical_to_logical()・hmm_add_pseudo_phones_sub()・htk_hmmdata_add()・make_hmm_basephone_list()・rdhmmlist()・regist_cdset()・state_add()・trans_add()・var_add().

void aptree_add_entry ( char *  str,
void *  data,
char *  matchstr,
APATNODE **  rootnode 
)

Insert a new node to the index tree.

引数:
str [in] new key string
data [in] new data pointer
matchstr [in] the most matching data already exist in the index tree, as obtained by aptree_search_data()
rootnode [i/o] pointer to root index node

aptree.c の 183 行で定義されています。

参照元 add_to_error()・codebook_add()・dens_add()・hmm_add_physical_to_logical()・hmm_add_pseudo_phones_sub()・htk_hmmdata_add()・make_hmm_basephone_list()・rdhmmlist()・regist_cdset()・state_add()・trans_add()・var_add().

void aptree_remove_entry ( char *  str,
APATNODE **  rootnode 
)

Remove a node from the index tree.

引数:
str [in] existing key string (must exist in the index tree)
rootnode [i/o] pointer to root index node

aptree.c の 254 行で定義されています。

参照元 remove_cdset().

void aptree_traverse_and_do ( APATNODE *  node,
void(*)(void *)  callback 
)

Recursive function to traverse index tree and execute the callback for all the existing data.

引数:
node [in] current node
callback [in] callback function

aptree.c の 276 行で定義されています。

参照元 aptree_traverse_and_do()・count_all_phone()・free_cdset()・list_error()・print_all_basephone_detail()・print_all_basephone_name()・put_all_cdinfo()・test_interword_triphone()・triphone_callback_left()・wt_tmix().

void free_aptree ( APATNODE *  node  ) 

Free all the sub nodes from specified node.

引数:
node [in] current node.

aptree.c の 296 行で定義されています。

参照元 free_aptree()・free_cdset()・hmminfo_free().


Juliusに対してTue Dec 26 16:20:11 2006に生成されました。  doxygen 1.5.0