v2.0.0
Loading...
Searching...
No Matches
firfilter.h
Go to the documentation of this file.
1//=============================================================================================================
26
27#ifndef FIRFILTER_DSP_H
28#define FIRFILTER_DSP_H
29
30//=============================================================================================================
31// INCLUDES
32//=============================================================================================================
33
34#include "dsp_global.h"
35#include "filterkernel.h"
36
37//=============================================================================================================
38// EIGEN INCLUDES
39//=============================================================================================================
40
41#include <Eigen/Core>
42
43//=============================================================================================================
44// DEFINE NAMESPACE UTILSLIB
45//=============================================================================================================
46
47namespace UTILSLIB
48{
49
50//=============================================================================================================
63{
64public:
65 //=========================================================================================================
70 {
71 LowPass = 0,
75 };
76
77 //=========================================================================================================
82 {
83 Cosine = 0,
85 };
86
87 //=========================================================================================================
107 static FilterKernel design(int iOrder,
108 FilterType type,
109 double dCutoffLow,
110 double dCutoffHigh,
111 double dSFreq,
112 double dTransition = 5.0,
113 DesignMethod method = Cosine);
114
115 //=========================================================================================================
128 static Eigen::RowVectorXd apply(const Eigen::RowVectorXd& vecData,
129 FilterKernel& kernel);
130
131 //=========================================================================================================
143 static Eigen::RowVectorXd applyZeroPhase(const Eigen::RowVectorXd& vecData,
144 FilterKernel& kernel);
145
146 //=========================================================================================================
156 static Eigen::MatrixXd applyZeroPhaseMatrix(const Eigen::MatrixXd& matData,
157 FilterKernel& kernel,
158 const Eigen::RowVectorXi& vecPicks = Eigen::RowVectorXi());
159
160 //=========================================================================================================
172 static Eigen::RowVectorXd designMne(double dSFreq, double dLFreq, double dHFreq);
173
174 //=========================================================================================================
187 static Eigen::MatrixXd filterData(const Eigen::MatrixXd& matData, double dSFreq, double dLFreq, double dHFreq);
188};
189
190} // namespace UTILSLIB
191
192#endif // FIRFILTER_DSP_H
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Linear-phase FIR filter kernel with overlap-add FFT convolution back-end.
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
The FilterKernel class provides methods to create/design a FIR filter kernel.
Discoverable façade over the FilterKernel FIR-filter engine.
Definition firfilter.h:63
FilterType
FIR filter type — mirrors IirFilter::FilterType for a uniform API.
Definition firfilter.h:70
DesignMethod
FIR design method — wraps FilterKernel's iDesignMethod integer codes.
Definition firfilter.h:82