cheb_filt_iir.cpp
来自「《无线通信系统仿真——c++使用模型》这本书的源代码」· C++ 代码 · 共 59 行
CPP
59 行
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// File = cheb_filt_iir.cpp
//
// Chebyshev Filter
//
//#include <math.h>
//#include "misdefs.h"
#include "parmfile.h"
#include "cheb_filt_iir.h"
#include "chebyshev_proto.h"
//#include "filter_types.h"
extern ParmFile *ParmInput;
#ifdef _DEBUG
extern ofstream *DebugFile;
#endif
//======================================================
// constructor
template < class T>
ChebyshevFilterByIir<T>::ChebyshevFilterByIir( char *instance_name,
PracSimModel *outer_model,
Signal<T> *in_sig,
Signal<T> *out_sig )
:AnalogFilterByIir<T>( instance_name,
outer_model,
in_sig,
out_sig )
{
MODEL_NAME(ChebyshevFilterByIir);
OPEN_PARM_BLOCK;
// Most of the parameters needed to specify a Chebyshev filter
// are common to all the classic types and are therefore
// read by the AnalogFilter base class.
//
// 'Ripple' is specific to Chebyshev so it is read here in the drerived class
if( !Bypass_Enabled)
{
GET_DOUBLE_PARM(Passband_Ripple_In_Db);
GET_BOOL_PARM(Bw_Is_Ripple_Bw);
// construct a Chebyshev prototype
Lowpass_Proto_Filt = new ChebyshevPrototype( Prototype_Order,
Passband_Ripple_In_Db,
Bw_Is_Ripple_Bw);
//Lowpass_Proto_Filt->DumpBiquads(DebugFile);
Lowpass_Proto_Filt->FilterFrequencyResponse();
}
return;
}
template <class T>
ChebyshevFilterByIir<T>::~ChebyshevFilterByIir(){};
template ChebyshevFilterByIir<float>;
template ChebyshevFilterByIir<std::complex<float> >;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?