libsent/src/util/aptree.c

パトリシア検索木を用いた名前検索:データ型がポインタの場合 [詳細]

#include <sent/stddefs.h>
#include <sent/ptree.h>

ソースコードを見る。

関数

static APATNODEnew_node (BMALLOC_BASE **mroot)
 Allocate a new node.
static void * aptree_search_data_r (APATNODE *node, char *str, int maxbitplace)
 Recursive function to search the data in the tree
void * aptree_search_data (char *str, APATNODE *node)
 Search for the data whose key string matches the given string.
APATNODEaptree_make_root_node (void *data, BMALLOC_BASE **mroot)
 Make a root node of a index tree.
static void aptree_add_entry_at (char *str, int slen, int bitloc, void *data, APATNODE **parentlink, BMALLOC_BASE **mroot)
 Insert a new node to the existing index tree.
void aptree_add_entry (char *str, void *data, char *matchstr, APATNODE **rootnode, BMALLOC_BASE **mroot)
 Insert a new node to the index tree.
static void aptree_remove_entry_r (APATNODE *now, APATNODE *up, APATNODE *up2, char *str, int maxbitplace, APATNODE **root)
 Recursive sunction to find and remove an entry.
void aptree_remove_entry (char *str, APATNODE **rootnode)
 Remove a node from the index tree.
void aptree_traverse_and_do (APATNODE *node, void(*callback)(void *))
 Recursive function to traverse index tree and execute the callback for all the existing data.
static void aptree_count (APATNODE *node, int *count_branch, int *count_data, int *maxbit)
static int aptree_build_index (APATNODE *node, int *num, int *data_id, int *left, int *right, int *data)
static void aptree_write_leaf (FILE *fp, APATNODE *node, boolean(*callback)(void *, FILE *fp), boolean *error_p)
boolean aptree_write (FILE *fp, APATNODE *root, boolean(*save_data_func)(void *, FILE *fp))
boolean aptree_read (FILE *fp, APATNODE **root, BMALLOC_BASE **mroot, void *data, boolean(*load_data_func)(void **, void *, FILE *))


説明

パトリシア検索木を用いた名前検索:データ型がポインタの場合

作者:
Akinobu LEE
日付:
Thu Feb 17 15:21:53 2005
Revision
1.3

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


関数

static APATNODE* new_node ( BMALLOC_BASE **  mroot  )  [static]

Allocate a new node.

戻り値:
pointer to the new node.

aptree.c35 行で定義されています。

参照元 aptree_add_entry_at()aptree_make_root_node()make_ptree()ptree_add_entry_at()ptree_make_root_node().

static void* aptree_search_data_r ( APATNODE node,
char *  str,
int  maxbitplace 
) [static]

Recursive function to search the data in the tree

引数:
node [in] current node.
戻り値:
pointer to the found data

aptree.c54 行で定義されています。

参照元 aptree_search_data().

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.c92 行で定義されています。

参照元 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()lcdset_lookup_with_category()make_hmm_basephone_list()mark_word_edge()mpdf_add()mpdf_lookup()new_str2phseq()rdhmmlist()regist_cdset()state_add()state_lookup()sw_add()sw_lookup()trans_add()trans_lookup()var_add()var_lookup().

APATNODE* aptree_make_root_node ( void *  data,
BMALLOC_BASE **  mroot 
)

Make a root node of a index tree.

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

aptree.c113 行で定義されています。

参照元 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()mpdf_add()rdhmmlist()regist_cdset()state_add()sw_add()trans_add()var_add().

static void aptree_add_entry_at ( char *  str,
int  slen,
int  bitloc,
void *  data,
APATNODE **  parentlink,
BMALLOC_BASE **  mroot 
) [static]

Insert a new node to the existing index tree.

引数:
str [in] new key string
bitloc [in] bit branch to which this node will be added
data [in] new data pointer
parentlink [i/o] the parent node to which this node will be added

aptree.c131 行で定義されています。

参照元 aptree_add_entry().

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

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.c206 行で定義されています。

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

static void aptree_remove_entry_r ( APATNODE now,
APATNODE up,
APATNODE up2,
char *  str,
int  maxbitplace,
APATNODE **  root 
) [static]

Recursive sunction to find and remove an entry.

引数:
now [in] current node
up [in] parent node
up2 [in] parent parent node

aptree.c229 行で定義されています。

参照元 aptree_remove_entry().

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.c275 行で定義されています。

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.c294 行で定義されています。

参照元 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().


Juliusに対してThu Jul 23 12:17:08 2009に生成されました。  doxygen 1.5.1