RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
iir_resp.h
Go to the documentation of this file.
1 //
2 // File = iir_resp.h
3 //
4 
5 #ifndef _IIR_RESP_H_
6 #define _IIR_RESP_H_
7 
8 #include "complex.h"
9 #include "iir_dsgn.h"
10 
12 {
13 public:
14  //-------------------------------------------------
15  // constructor with all configuration parameters
16  // passed as input arguments
17 
18  IirFilterResponse(IirFilterDesign* filter_design, int num_resp_pts,
19  int db_scale_enabled, int normalize_enabled,
20  char* resp_file_name);
21 
22  //--------------------------------------------------
23  // alternate constructor with configuration
24  // parameters obtained interactively through
25  // streams uin and uout
26 
27  IirFilterResponse(IirFilterDesign* filter_design, std::istream& uin,
28  std::ostream& uout);
29 
30  //--------------------------------------
31  // method to compute frequency response
32  // from the data set up by constructor
33 
34  virtual void ComputeResponse(void);
35 
36  //---------------------------------------
37  // method to normalize magnitude response
38 
39  void NormalizeResponse(void);
40 
41  //-----------------------------
42  // method that returns pointer
43  // to an array that holds the
44  // completed magnitude response
45  // (ordinates only)
46 
47  double* GetMagResp(void);
48 
49  //------------------------------------
50  // method that outputs magnitude
51  // response to the stream
52  // pointed-to by Response_File
53  // (ordinates and normalized abscissae
54 
55  void DumpMagResp(void);
56 
57  double GetIntervalPeak(int beg_indx, int end_indx);
58 
59 protected:
64  std::ofstream* Response_File;
68  double* Mag_Resp;
69  double* Phase_Resp;
70 };
71 
72 #endif
IirFilterDesign * Filter_Design
Definition: iir_resp.h:60
void NormalizeResponse(void)
Definition: iir_resp.cpp:175
void DumpMagResp(void)
Definition: iir_resp.cpp:220
std::ofstream * Response_File
Definition: iir_resp.h:64
int Num_Denom_Coeffs
Definition: iir_resp.h:66
complex * Freq_Resp
Definition: iir_resp.h:67
int Db_Scale_Enabled
Definition: iir_resp.h:62
IirFilterResponse(IirFilterDesign *filter_design, int num_resp_pts, int db_scale_enabled, int normalize_enabled, char *resp_file_name)
Definition: iir_resp.cpp:27
double * Mag_Resp
Definition: iir_resp.h:68
virtual void ComputeResponse(void)
Definition: iir_resp.cpp:104
int Normalize_Enabled
Definition: iir_resp.h:63
int Num_Numer_Coeffs
Definition: iir_resp.h:65
double * GetMagResp(void)
Definition: iir_resp.cpp:209
double * Phase_Resp
Definition: iir_resp.h:69
double GetIntervalPeak(int beg_indx, int end_indx)
Definition: iir_resp.cpp:243