tr_tr_back_2.cc

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

CC
55
字号
// file: tr_tr_back_2.cc//// isip include files//#include "train_trace.h"#include "train_trace_constants.h"// method: set_back_ptr_cc//// arguments://  Train_Trace** trace: (input) the path back pointer to be set//// return: a logical_1 indicating status//// this method sets the input trace array as the path back pointer array//logical_1 Train_Trace::set_back_ptr_cc(Train_Trace** traces_a) {  // if the backpointer array is already allocated  //  if (back_ptr_d != (Train_Trace**)NULL) {    delete [] back_ptr_d;  }  // if the input is a null array  //  if (traces_a == (Train_Trace**)NULL) {    back_ptr_d = (Train_Trace**)NULL;  }    // otherwise copy the new back pointer array  //  else {        // allocate and initialize    //    back_ptr_d = new Train_Trace*[backptr_size_d];    for (int_4 i = 0; i < backptr_size_d; i++) {      back_ptr_d[i] = (Train_Trace*)NULL;    }    // copy pointers    //    for (int_4 i = 0; (i < backptr_size_d) &&	   (traces_a[i] != (Train_Trace*)NULL); i++) {      back_ptr_d[i] = traces_a[i];    }  } // end else  // exit gracefully  //  return ISIP_TRUE;}

⌨️ 快捷键说明

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