|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knowceans.sandbox.FirFilter
public class FirFilter
FirFilter implements a simple FIR filter, exploiting the symmetries of the complex spectrum of real signals.
Conventions: suffix z specifies a complex quantity or its size, they are stored with interleaved real and imaginary parts.
Constructor Summary | |
---|---|
FirFilter()
|
Method Summary | |
---|---|
static long |
dualFir(double[] Wz,
double[] Xz,
double[] tempz,
double[] Yz,
double[] H1z,
double[] H2z,
int Nz)
Frequency domain filtering of two real signals with two different real FIR filters. |
static void |
fft(double[] Xz,
double[] Wz,
int Nz)
forward FFT |
static void |
fftr(double[] X,
double[] Wz,
int N)
forward real-to-complex FFT with half length |
static void |
ffw(double[] Wz,
int Nz)
create FFT coefficients for size N |
static long |
fir(double[] Wz,
double[] X,
double[] tempz,
double[] Y,
double[] Hz,
int N)
Frequency domain filtering of one real sequence using half-size FFT. |
static void |
ifft(double[] Xz,
double[] Wz,
int Nz)
inverse FFT |
static void |
ifftr(double[] Xz,
double[] Wz,
int Nz)
inverse complex-to-real FFT with half length |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FirFilter()
Method Detail |
---|
public static void ffw(double[] Wz, int Nz)
Wz
- N/2 complex valuesNz
- FFT sizepublic static void fft(double[] Xz, double[] Wz, int Nz)
Xz
- data (complex interleaved)Wz
- coefficients (complex interleaved)Nz
- FFT size (complex)public static void ifft(double[] Xz, double[] Wz, int Nz)
Xz
- data (complex interleaved)Wz
- coefficients (complex interleaved)Nz
- FFT size (complex)public static void fftr(double[] X, double[] Wz, int N)
X
- data [N] (real)Yz
- output [N/2 + 1] (complex)Wz
- [N/2] coefficients (complex interleaved, of full-size FFT)N
- FFT size (real)public static void ifftr(double[] Xz, double[] Wz, int Nz)
Xz
- data (complex interleaved)Wz
- coefficients (complex interleaved)Nz
- FFT size (complex)public static long dualFir(double[] Wz, double[] Xz, double[] tempz, double[] Yz, double[] H1z, double[] H2z, int Nz)
Wz
- [N/2] twiddling factors (complex interleaved)Xz
- [N] complex input vector (pair = real, imag) (complex
interleaved)tempz
- [N] temporary bufferYz
- [N] complex output vector (complex interleaved)H1z
- [N/2 + 1] DFT of IR for filter 1 (complex interleaved)H2z
- --"-- for filter 2 (complex interleaved)Nz
- length of input and output vectors (complex)
public static long fir(double[] Wz, double[] X, double[] tempz, double[] Y, double[] Hz, int N)
Wz
- [N/4] twiddling factors (complex interleaved, of half-size FFT)Xz
- [N] real input vectortempz
- [N] temporary bufferY
- [N] real output vectorHz
- [N/4 + 1] DFT of IR (complex interleaved)N
- length of input and output vectors
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |