tr_lat_cstr_3.cc

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

CC
56
字号
// file: tr_lat_cstr_3.cc//// isip include files//#include "train_lattice.h"#include "train_lattice_constants.h"// method: copy constructor//// arguments://  Train_Lattice& Train_Lattice_a: (input) Latitce to copy information from//// return: none//// this is an overloaded constructor//Train_Lattice::Train_Lattice(Train_Lattice& Train_Lattice_a) {  // define local variables  //  int_4 str_len = (int_4)0;  // set node statistics  //  num_arcs_d = Train_Lattice_a.num_arcs_d;  num_nodes_d = Train_Lattice_a.num_nodes_d;    // set node pointers  //  lnode_d = Train_Lattice_a.lnode_d;  start_node_d = Train_Lattice_a.start_node_d;    // create memory for the character strings and then copy  //  str_len = strlen((char*)Train_Lattice_a.lang_model_d) + 1;  lang_model_d = new char_1[str_len];  strcpy((char*)lang_model_d,(char*)Train_Lattice_a.lang_model_d);    str_len = strlen((char*)Train_Lattice_a.utterance_d) + 1;  utterance_d = new char_1[str_len];  strcpy((char*)utterance_d,(char*)Train_Lattice_a.utterance_d);  str_len = strlen((char*)Train_Lattice_a.model_set_d) + 1;  model_set_d = new char_1[str_len];  strcpy((char*)model_set_d,(char*)Train_Lattice_a.model_set_d);    // set likelihood scale factors  //  lm_scale_d = Train_Lattice_a.lm_scale_d;  word_penalty_d = Train_Lattice_a.word_penalty_d;    // exit gracefully  //}

⌨️ 快捷键说明

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