|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hermit.dsp.Window
public final class Window
A windowing function for a discrete signal. This is used to pre-process a signal prior to FFT, in order to improve the frequency response, essentially by eliminating the discontinuities at the ends of a block of samples.
Nested Class Summary | |
---|---|
static class |
Window.Function
Definitions of the available window functions. |
Constructor Summary | |
---|---|
Window(int size)
Create a window function for a given sample size. |
|
Window(int size,
Window.Function function)
Create a window function for a given sample size. |
Method Summary | |
---|---|
void |
transform(double[] input)
Apply the window function to a given data block. |
void |
transform(double[] input,
int off,
int count)
Apply the window function to a given data block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Window(int size)
size
- The number of samples in a block that we will
be asked to transform.public Window(int size, Window.Function function)
size
- The number of samples in a block that we will
be asked to transform.function
- The window function to use. Function.RECTANGULAR
effectively means no transformation.Method Detail |
---|
public final void transform(double[] input)
input
- The input data buffer. This data will be
transformed in-place by the window function.
java.lang.IllegalArgumentException
- Invalid data size.public final void transform(double[] input, int off, int count)
input
- The input data buffer. This data will be
transformed in-place by the window function.off
- Offset in the buffer at which the data to
be transformed starts.count
- Number of samples in the data to be
transformed. Must be the same as the size
parameter that was given to the constructor.
java.lang.IllegalArgumentException
- Invalid data size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |