kern_06.cc
来自「这是一个从音频信号里提取特征参量的程序」· CC 代码 · 共 60 行
CC
60 行
// file: $isip/class/algo/Kernel/kern_06.cc// version: $Id: kern_06.cc,v 1.1 2001/07/20 15:51:56 hamaker Exp $//// isip include files//#include "Kernel.h"// method: setConstants//// arguments: // const VectorFloat& values: (input) vector of constants//// return: a boolean value indicating status//// this method sets the constants of the Kernel//boolean Kernel::setConstants(const VectorFloat& values_a) { // make sure the correct number of coefficients are specified // for the given algorithm // if (algorithm_d == LINEAR) { if (values_a.length() != DEF_LIN_CONSTANTS.length()) { return Error::handle(name(), L"setConstants", ERR, __FILE__, __LINE__); } } else if (algorithm_d == POLYNOMIAL) { if (values_a.length() != DEF_POLY_CONSTANTS.length()) { return Error::handle(name(), L"setConstants", ERR, __FILE__, __LINE__); } } else if (algorithm_d == RBF) { if (values_a.length() != DEF_RBF_CONSTANTS.length()) { return Error::handle(name(), L"setConstants", ERR, __FILE__, __LINE__); } } else if (algorithm_d == SIGMOID) { if (values_a.length() != DEF_SIGM_CONSTANTS.length()) { return Error::handle(name(), L"setConstants", ERR, __FILE__, __LINE__); } } else { return Error::handle(name(), L"setConstants", Error::ENUM, __FILE__, __LINE__); } // set the constants // constants_d.assign(values_a); // make the kernel invalid // is_valid_d = false; // exit gracefully // return true;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?