com.oregondsp.signalProcessing
Class Window

java.lang.Object
  extended by com.oregondsp.signalProcessing.Window
Direct Known Subclasses:
HammingWindow, HanningWindow

public class Window
extends java.lang.Object

Base class for implementing windows - partial implementation.


Constructor Summary
Window(float[] w)
          Instantiates a new Window from a vector of coefficients.
Window(int N)
          Instantiates a new length-N window containing zeros.
 
Method Summary
 float[] getArray()
          Returns a copy of the coefficients of this window.
 int length()
          Returns the length of the window in samples.
 void timesEquals(float[] x)
          Allows a window to be modified in-place by multiplication by another window.
 void window(float[] x, int index, float[] y)
          Windows a sequence and places the result in a specified array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Window

public Window(float[] w)
Instantiates a new Window from a vector of coefficients.

Parameters:
w - float[] containin the vector of window coefficients.

Window

public Window(int N)
Instantiates a new length-N window containing zeros.

Parameters:
N - int specifying the window length in samples.
Method Detail

length

public int length()
Returns the length of the window in samples.

Returns:
int containing the window length in samples.

timesEquals

public void timesEquals(float[] x)
Allows a window to be modified in-place by multiplication by another window.

Parameters:
x - float[] containing the coefficients of the second window, which modifies the first (this) window.

getArray

public float[] getArray()
Returns a copy of the coefficients of this window.

Returns:
float[] containing window coefficients.

window

public void window(float[] x,
                   int index,
                   float[] y)
Windows a sequence and places the result in a specified array.

Parameters:
x - float[] containing the sequence to be windowed by this Window.
index - start point in the input sequence at which this Window is applied.
y - float[] containing the resulting windowed sequence.