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

📄 mask_00.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/class/algo/Mask/mask_00.cc// version: $Id: mask_00.cc,v 1.9 2001/05/08 05:43:16 roberts Exp $//// isip include files//#include "Mask.h"//------------------------------------------------------------------------//// required public methods////-----------------------------------------------------------------------// method: assign//// arguments://  const Mask& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method assigns the input object to the current object//boolean Mask::assign(const Mask& arg_a) {  // assign the algorithm name  //  algorithm_d = arg_a.algorithm_d;  // assign the implementation name  //  implementation_d = arg_a.implementation_d;    // assign mask string  //  source_d.assign(arg_a.source_d);  // assign mask vector  //  mask_d.assign(arg_a.mask_d);  // assign AlgorithmBase and exit gracefully  //  return AlgorithmBase::assign(arg_a);}// method: eq//// arguments://  const Mask& arg: (input) object to be compared//// return: a boolean value indicating status//// this method checks whether the current object is identical to the// input object//boolean Mask::eq(const Mask& arg_a) const {  // compare the data members  //  if ((algorithm_d != arg_a.algorithm_d) ||      (implementation_d != arg_a.implementation_d) ||      (!source_d.eq(arg_a.source_d))) {        // exit gracefully    //    return false;  }  // exit gracefully by checking the base class  //  return AlgorithmBase::eq(arg_a);}// 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 Mask::clear(Integral::CMODE ctype_a) {  // reset the data members unless the mode is RETAIN  //  if (ctype_a != Integral::RETAIN) {    algorithm_d = DEF_ALGORITHM;    implementation_d = DEF_IMPLEMENTATION;    mask_d.clear(ctype_a);    source_d.clear(ctype_a);  }  // 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 Mask// object. if the input algorithm object is not a Mask object, it is// an error.//boolean Mask::assign(const AlgorithmBase& arg_a) {  // case: input is a Mask object  //    if (typeid(arg_a) == typeid(Mask)) {    return assign((Mask&)arg_a);  }  // case: other  //  if the input algorithm object is not a Mask object, error.  //    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 Mask object is identical to// the input algorithm object. if the input algorithm object is not a// Mask object, it returns an error.//boolean Mask::eq(const AlgorithmBase& arg_a) const {  // case: input is a Mask object  //    if (typeid(arg_a) == typeid(Mask)) {    return eq((Mask&)arg_a);  }  // case: other  //  if the input algorithm object is not a Mask object, return  //  an error.  //    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 Mask::CLASS_NAME(L"Mask");// constants: i/o related constants//const String Mask::DEF_PARAM(L"");const String Mask::PARAM_ALGORITHM(L"algorithm");const String Mask::PARAM_IMPLEMENTATION(L"implementation");const String Mask::PARAM_MASK(L"mask");// constants: NameMap(s) for the enumerated values//const NameMap Mask::ALGO_MAP(L"SELECT, REMOVE");const NameMap Mask::IMPL_MAP(L"INDEX");// static instantiations: memory manager//MemoryManager Mask::mgr_d(sizeof(Mask), Mask::name());

⌨️ 快捷键说明

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