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

📄 uni_07.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/class/stat/UniformModel/uni_07.cc// version: $Id: uni_07.cc,v 1.3 2001/02/26 16:24:31 hamaker Exp $//// isip include files//#include "UniformModel.h"// method: init//// arguments: none//// return: a boolean value//// this method initializes the distribution//boolean UniformModel::init() {  // if we are not in the precompute mode, we don't need to do anything.  //  if (mode_d != PRECOMPUTE) {    is_valid_d = true;    return true;  }  // compute the scale factor  //  scale_d = initScale();  // exit gracefully  //  return (is_valid_d = true);}// method: initScale//// arguments: none//// return: a boolean value//// this method computes the scale factor for the distribution// (see getLikelihood() for a more detailed explanation).//float UniformModel::initScale() {  // check the arguments  //  long len = min_d.length();  if (len != max_d.length()) {    Error::handle(name(), L"initScale", ERR, __FILE__, __LINE__);    return 0;  }  // compute the surface area of the region of support for the distribution  //  float sum = 1.0;  for (long i = 0; i < len; i++) {    if(!max_d(i).eq(min_d(i)))       sum *= max_d(i) - min_d(i);  }  // set the scale factor to the inverse of this number and return the  // scale  //  return 1.0 / sum;}

⌨️ 快捷键说明

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