📄 spec_00.cc
字号:
// file: $isip/class/algo/Spectrum/spec_00.cc// version: $Id: spec_00.cc,v 1.10 2002/07/02 23:20:05 picone Exp $//// isip include files//#include "Spectrum.h"//---------------------------------------------------------------------------//// class-specific public methods: // AlgorithmBase interface contract methods////---------------------------------------------------------------------------// 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// Spectrum object//boolean Spectrum::assign(const AlgorithmBase& arg_a) { // case: input is an Spectrum object // if (typeid(arg_a) == typeid(Spectrum)) { return assign((Spectrum&)arg_a); } // case: other // if the input algorithm object is not a Spectrum object, return // an 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 Spectrum object is identical// to the input algorithm object//boolean Spectrum::eq(const AlgorithmBase& arg_a) const { // case: input is a Spectrum object // if (typeid(arg_a) == typeid(Spectrum)) { return eq((Spectrum&)arg_a); } // case: other // if the input algorithm object is not a Spectrum 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 Spectrum::CLASS_NAME(L"Spectrum");// constants: i/o related constants//const String Spectrum::DEF_PARAM(L"");const String Spectrum::PARAM_ALGORITHM(L"algorithm");const String Spectrum::PARAM_IMPLEMENTATION(L"implementation");const String Spectrum::PARAM_DYN_RANGE(L"dynamic_range");const String Spectrum::PARAM_FT(L"ft");// constants: maximum entropy spectrum scale//const Float Spectrum::MAGNITUDE_SCALE(-20);const ComplexFloat Spectrum::COMPLEX_SCALE(-20);// constants: NameMap(s) for the enumerated values//const NameMap Spectrum::ALGO_MAP(L"FOURIER, MAXIMUM_ENTROPY");const NameMap Spectrum::IMPL_MAP(L"MAGNITUDE, COMPLEX");// static instantiations: memory manager and debug level//MemoryManager Spectrum::mgr_d(sizeof(Spectrum), Spectrum::name());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -