lat_set_9.cc

来自「这是处理语音信号的程序」· CC 代码 · 共 56 行

CC
56
字号
// file: lat_set_8.cc//// system include files//#include <string.h>// isip include files//#include "lattice.h"#include "lattice_constants.h"// method: set_lat_node_cc//// arguments://  Lattice_node* lnode: (input) lattice node to add to hash table//// return: a logical_1 indicating status//// this method adds a lattice node to the lattice table//logical_1 Lattice::set_lat_node_cc(Lattice_node* lnode_a) {  // if this is a null node return  //  if (lnode_a == (Lattice_node*)NULL) {    return ISIP_FALSE;  }  // initialize the hash table if not created so far  //  if (lnode_d == (Hash_table*)NULL) {    lnode_d = new Hash_table(num_nodes_d);  }  // memory manager  //  Memory_manager* manager = Link_list::get_manager_cc();    // create a hash cell for the lattice node  //  static char_1 key_str[LATTICE_KEYSTR_LENGTH];  strcpy((char*)key_str, "");  sprintf((char*)key_str, "%p", lnode_a);  Hash_cell* hcell = manager->new_hash_cc();  hcell->set_cc(key_str, (void_p)lnode_a);    // insert the hash cell in the lattice node table  //  lnode_d->hash_insert_cc(hcell);  // exit gracefully  //  return ISIP_TRUE;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?