lat_arrange_0.cc

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

CC
53
字号
// file: lat_arrange_0.cc//// isip include files//#include "lattice.h"#include "lattice_constants.h"// method: lat_arrange_cc//// arguments://   Lattice_node**& lnodes: (output) array of lattice nodes//// return: a logical_1 indicating status//// this method recursively arranges lattice nodes in order of index//logical_1 Lattice::lat_arrange_cc(Lattice_node**& lnodes_a) {    // allocate correct amount of memory and initialize  //  if (lnodes_a != (Lattice_node**)NULL) {    delete [] lnodes_a;  }  lnodes_a = new Lattice_node*[num_nodes_d];  for (int_4 i = 0; i < num_nodes_d; i++) {    lnodes_a[i] = (Lattice_node*)NULL;  }  // define some local variables  //  Lattice_node* latn = (Lattice_node*)NULL;  // get the hash cells of the lattice  //  Hash_cell** lcells = lnode_d->get_cells_cc();  int_4 hsize = lnode_d->get_size_cc();  // loop over all cells and fill up array  //  for (int_4 k = 0; k < hsize; k++) {    for (Hash_cell* cell = lcells[k]; cell != (Hash_cell*)NULL;	 cell = cell->get_next_cc()) {      latn = (Lattice_node*)(cell->get_item_cc());      lnodes_a[latn->get_node_index_cc()] = latn;    }  }      // exit gracefully  //  return ISIP_TRUE;}

⌨️ 快捷键说明

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