lat_wer_5.cc

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

CC
60
字号
// file: lat_wer_5.cc//// isip include files//#include "lattice.h"#include "lattice_constants.h"// method: free_list_cc//// arguments://  Link_list* list: (input) the link list to clean up//// return: a logical_1 indicating status//// this method deletes the contents of the input link list//logical_1 Lattice::free_list_cc(Link_list* list_a) {  // memory manager  //  Memory_manager* manager = Link_list::get_manager_cc();    // lattice path  //  Lattice_path* lpath = (Lattice_path*)NULL;  // link nodes  //  Link_node* nd = (Link_node*)NULL;  Link_node* pd = (Link_node*)NULL;    // check if the link list exists  //  if (list_a != (Link_list*)NULL) {        // loop over all nodes in the list    //    for (nd = list_a->get_head_cc(); nd != (Link_node*)NULL; nd = pd) {            // get the next node      //      pd = nd->get_next_cc();            // get the lattice path and delete it      //      lpath = (Lattice_path*)(nd->get_item_cc());      manager->delete_cc(lpath);            // delete this node      //      list_a->remove_cc(nd);    }  } // end if list exists    // exit gracefully  //  return ISIP_TRUE;}

⌨️ 快捷键说明

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