📄 fir_dsgn.h
字号:
//
// File = fir_dsgn.h
//
#ifndef _FIR_DSGN_H_
#define _FIR_DSGN_H_
#include <fstream.h>
#include "gen_win.h"
#include "typedefs.h"
class FirFilterDesign
{
public:
//---------------------
// default constructor
FirFilterDesign( );
//-------------------------------------
// constructor that allocates array of
// length num_taps to hold coefficients
FirFilterDesign( int num_taps );
//-------------------------------------
// constructor that allocates array of
// length num_taps and initializes this
// array to values contained in input
// array *imp_resp_coeff
FirFilterDesign( int num_taps,
double *imp_resp_coeff );
//------------------------------------------
// allocate coefficient array *Imp_Resp_Coeff
// after default constructor has been used
void Initialize( int num_taps );
//-------------------------------------------
// method to quantize coefficients
void QuantizeCoefficients( long quant_factor,
logical rounding_enabled );
//-------------------------------------------
// method to scale coefficients
void ScaleCoefficients( double scale_factor );
//----------------------------------------
// copy coefficients from input array
// *coeff into array *Imp_Resp_Coeff
void CopyCoefficients( double *coeff);
//----------------------------------------------
// dump coefficient set to output_stream
void DumpCoefficients( ofstream* output_stream);
//----------------------------------
// get pointer to coefficient array
//this should be changed to new a copy and return
// pointer to this copy
double* GetCoefficients(void);
//---------------------------
// get number of filter taps
int GetNumTaps(void);
//---------------------------------------
// apply discrete-time window
// to filter coefficients
void ApplyWindow( GenericWindow *window);
protected:
int Num_Taps;
double* Imp_Resp_Coeff;
double* Original_Coeff;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -