IIRFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00030
00031 #ifndef __IIR_FILTER_H_
00032 #define __IIR_FILTER_H_
00033
00034 #ifdef MIP_HOST_APPLE
00035 #include <applePatch.h>
00036 #endif
00037
00038 #include <vector>
00039 #include <list>
00040
00041 #include<baselib.h>
00042
00043
00044 using namespace MipBaselib;
00045
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00067 class IIRFilter{
00068 private:
00069 vector< vector<Decimal> > _inCoeff;
00070 vector<Decimal> _outCoeff;
00071 vector< list<Decimal> > _pastIns;
00072 list<Decimal> _pastOuts;
00073 int _order;
00074 int _inNum;
00075 list<Decimal>::iterator outIt,inIt;
00076 int iCo,iIn;
00077
00078 void _kernelConstructor(vector< vector<Decimal> > &inputCoeff,vector<Decimal> &outputCoeff);
00079 public:
00080
00091 IIRFilter(vector<Decimal> &inputCoeff,vector<Decimal> &outputCoef);
00092
00103 IIRFilter(vector< vector<Decimal> > &inputCoeff,vector<Decimal> &outputCoef);
00104
00105
00106
00107
00108 ~IIRFilter();
00109
00111 IIRFilter(const IIRFilter& t);
00112
00114 IIRFilter& operator=(const IIRFilter& t);
00115
00120 void step(const Decimal &in,Decimal& out);
00121
00125 void step(const vector<Decimal>& in,Decimal& out);
00126 };
00127
00128
00129
00130 #endif
00131
00132
00133
00134