⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subscript.cpp

📁 神经网络是序列预测,C++实现
💻 CPP
字号:
tseries operator[](mask& m) const {	  unsigned int mask_size = m.size();  // if mask is not same size as rows of tseries, then we cannot proceed  if(mask_size!=rows) {    cerr << "tseries& operator[](const mask m): bad mask." << endl;    return tseries();  }  // init ans to size of elements of mask which are TRUE  unsigned int ans_rows = m.total_true();  tseries ans(ans_rows,cols);  // loop through mask   unsigned int ans_row = 0;  double* ans_data = ans.getData();  DateT* ans_dates = ans.getDates();  // loop through mask and set elements of new ans whenever mask is TRUE  for(unsigned int i = 0; i < mask_size; i++) {    if(m[i]) {      ans_dates[ans_row] = dates[i];      for(unsigned int c = 0; c < cols; c++) {	ans_data[ans_row + c*ans_rows] = data[i + c*rows];      }      ans_row++;    }  }  // set colnames of new answer  ans.setColNames(colnames);  return ans;}// when [] is used w/ a string it is just an alias for getColTStseries operator[](const string s) const {  return getColTS(s);}

⌨️ 快捷键说明

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