// DSP_Filter.h: interface for the DSP_Filter class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DSP_FILTER_H__2649F000_8C49_11D7_8A9A_DF0DA3FB6A79__INCLUDED_)
#define AFX_DSP_FILTER_H__2649F000_8C49_11D7_8A9A_DF0DA3FB6A79__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class DSP_Filter
{
public:
void Amplifier(double* dest,double* source,int lenght,double ampl);
double FindMin(double* source,int lenght);
double FindMax(double* source,int lenght);
void WFilter_Low40Hz(double*dest,double*source,int lenght,int fsmpl,double cf);
void WFilter_Noht(double* dest,double* source,int lenght,int fsmpl,double cf);
void WFilter_Low100Hz(double* dest,double* source,int lenght,int fsmpl,double cf);
void LoadFilterKernels(int fsmpl);
void Message(double var);
double StandardDeviation(double* source,int lenght);
void Delta1(double* dest,double* source,int lenght);
void Delta2(double* dest,double* source,int lenght);
void DeltaReverse1(double* dest,double* source,int lenght);
void DeltaReverse2(double* dest,double* source,int lenght);
double Mean(double *source, int lenght);
void SetArrToNormalize(double *dest,int lenght);
void NormalizeArr(double *ar, double mean, int lenght);
void InvertArr(double* dest,double* source,int lenght);
void WFilter_High(double* dest,double* source,int lenght,double amp,int fsmpl,double fk);
void RFilter_Noht(double* dest,int lenght,int fsmpl,double fcut,double bw);
double* X;
double* Y;
void RFilter_Low(double* dest,int lenght,int fsmpl,double fk);
DSP_Filter();
virtual ~DSP_Filter();
private:
int CreateWF40Low(int fsmpl,int f_kernel);
int CreateWFLow(int fsmpl,int f_kernel);
int CreateWFHigh(int fsmpl,int f_kernel);
int CreateWF50Noht(int fsmpl,int f_kernel);
double L40HZ[100];
double H[200];
double L[100];
double B1[100];
double B2[100];
void SlideArrRight(double* dest,double* source,int lenght,int slide);
void SlideArrLeft(double* dest,double* source,int lenght,int slide);
bool b_arr_flag;
void Delete_Arrs();
void Greate_Arrs(int new_lenght);
double PI;
void MoveArr(double* dest,double* source, int lenght);
void ZeroArrs(int lenght);
};
#endif // !defined(AFX_DSP_FILTER_H__2649F000_8C49_11D7_8A9A_DF0DA3FB6A79__INCLUDED_)