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

📄 corr_00.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/class/algo/Correlation/corr_00.cc// version: $Id: corr_00.cc,v 1.15 2002/05/31 21:57:24 picone Exp $//// isip include files//#include "Correlation.h" //------------------------------------------------------------------------//// required public methods////-----------------------------------------------------------------------// method: assign//// arguments://  const Correlation& arg: (input) object to assign//// return: a boolean value indicating status//// this method assigns the input object to current object//boolean Correlation::assign(const Correlation& arg_a) {  // assign all protected data  //  algorithm_d = arg_a.algorithm_d;  implementation_d = arg_a.implementation_d;  normalization_d = arg_a.normalization_d;  order_d = arg_a.order_d;  // call the base assign method:  //  note that the base class assign method sets the initialization flag  //  return AlgorithmBase::assign(arg_a);}// method: eq//// arguments://  const Correlation& arg: (input) input object to assign//// return: a boolean value indicating status//// this method checks whether the current object is identical to the// input object//boolean Correlation::eq(const Correlation& arg_a) const {  // compare all protected data  //  return ((algorithm_d == arg_a.algorithm_d) &&	  (implementation_d == arg_a.implementation_d) &&	  (normalization_d == arg_a.normalization_d) &&	  (order_d == arg_a.order_d));}// method: clear//// arguments://  Integral::CMODE ctype: (input) clear mode//// return: a boolean value indicating status//// this method resets the data members to the default values//boolean Correlation::clear(Integral::CMODE ctype_a) {  // reset all protected data  //  if (ctype_a != Integral::RETAIN) {    algorithm_d = DEF_ALGORITHM;    implementation_d = DEF_IMPLEMENTATION;    normalization_d = DEF_NORMALIZATION;    order_d = DEF_ORDER;  }    // call the base clear method  //  return AlgorithmBase::clear(ctype_a);}//---------------------------------------------------------------------------//// class-specific public methods://  public methods required by the AlgorithmBase interface contract////---------------------------------------------------------------------------// method: assign//// arguments://  const AlgorithmBase& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method assigns the input algorithm object to the current// Correlation object. if the input algorithm object is not a Correlation// object, it errors.//boolean Correlation::assign(const AlgorithmBase& arg_a) {  if (typeid(arg_a) == typeid(Correlation)) {    return assign((Correlation&)arg_a);  }  else {    return Error::handle(name(), L"assign", Error::ARG, __FILE__, __LINE__);  }}// method: eq//// arguments://  const AlgorithmBase& arg: (input) object to be compared//// return: a boolean value indicating status//// this method checks whether the current Correlation object is identical// to the input algorithm object. if the input algorithm object is not// a Correlation object, it errors.//boolean Correlation::eq(const AlgorithmBase& arg_a) const {    if (typeid(arg_a) == typeid(Correlation)) {    return eq((Correlation&)arg_a);  }  else {    return Error::handle(name(), L"eq", Error::ARG, __FILE__, __LINE__);  }}//-----------------------------------------------------------------------------//// we define non-integral constants in the default constructor//      //-----------------------------------------------------------------------------// constants: class name//const String Correlation::CLASS_NAME(L"Correlation");// constants: i/o related constants//const String Correlation::DEF_PARAM(L"");const String Correlation::PARAM_ALGORITHM(L"algorithm");const String Correlation::PARAM_IMPLEMENTATION(L"implementation");const String Correlation::PARAM_CMODE(L"compute_mode");const String Correlation::PARAM_NORMALIZATION(L"normalization");const String Correlation::PARAM_ORDER(L"order");// constants: NameMap(s) for the enumerated values//const NameMap Correlation::ALGO_MAP(L"AUTO, AUTO_TAPERED, CROSS, CONV");const NameMap Correlation::IMPL_MAP(L"FACTORED, UNFACTORED, CIRCULAR");const NameMap Correlation::NORM_MAP(L"NONE, LENGTH, UNIT_ENERGY");// static instantiations: memory manager//MemoryManager Correlation::mgr_d(sizeof(Correlation), Correlation::name());

⌨️ 快捷键说明

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