📄 kern_06.cc
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -