edu.mines.jtk.dsp
Class RecursiveParallelFilter

java.lang.Object
  extended by edu.mines.jtk.dsp.RecursiveParallelFilter

public class RecursiveParallelFilter
extends java.lang.Object

A recursive parallel filter is implemented as a sum of 2nd-order filters. In other words, the output of a recursive parallel filter is the sum of the outputs of 2nd-order recursive filters applied to the same input.

An advantage of recursive parallel filters is that they can be applied in both forward and reverse directions to obtain symmetric zero-phase filters, without end effects. The 2nd-order filters applied in this two-way forward-and-reverse application are not the same as those applied in one-way forward or reverse applications.

A disadvantage of recursive parallel filters is that they cannot be applied in-place; input and output arrays must be distinct arrays. Also, in the current implementation, the number of non-zero zeros cannot exceed the number of non-zero poles, and all poles must be unique.

Version:
2005.04.19
Author:
Dave Hale, Colorado School of Mines

Constructor Summary
protected RecursiveParallelFilter()
           
  RecursiveParallelFilter(Cdouble[] poles, Cdouble[] zeros, double gain)
          Constructs a recursive filter with specified poles, zeros, and gain.
 
Method Summary
 void apply1Forward(float[][][] x, float[][][] y)
          Applies this filter along the 1st dimension in the forward direction.
 void apply1Forward(float[][] x, float[][] y)
          Applies this filter along the 1st dimension in the forward direction.
 void apply1ForwardReverse(float[][][] x, float[][][] y)
          Applies this filter along the 1st dimension in the forward and reverse directions.
 void apply1ForwardReverse(float[][] x, float[][] y)
          Applies this filter along the 1st dimension in the forward and reverse directions.
 void apply1Reverse(float[][][] x, float[][][] y)
          Applies this filter along the 1st dimension in the reverse direction.
 void apply1Reverse(float[][] x, float[][] y)
          Applies this filter along the 1st dimension in the reverse direction.
 void apply2Forward(float[][][] x, float[][][] y)
          Applies this filter along the 2nd dimension in the forward direction.
 void apply2Forward(float[][] x, float[][] y)
          Applies this filter along the 2nd dimension in the forward direction.
 void apply2ForwardReverse(float[][][] x, float[][][] y)
          Applies this filter along the 2nd dimension in the forward and reverse directions.
 void apply2ForwardReverse(float[][] x, float[][] y)
          Applies this filter along the 2nd dimension in the forward and reverse directions.
 void apply2Reverse(float[][][] x, float[][][] y)
          Applies this filter along the 2nd dimension in the reverse direction.
 void apply2Reverse(float[][] x, float[][] y)
          Applies this filter along the 2nd dimension in the reverse direction.
 void apply3Forward(float[][][] x, float[][][] y)
          Applies this filter along the 3rd dimension in the forward direction.
 void apply3ForwardReverse(float[][][] x, float[][][] y)
          Applies this filter along the 3rd dimension in the forward and reverse directions.
 void apply3Reverse(float[][][] x, float[][][] y)
          Applies this filter along the 3rd dimension in the reverse direction.
 void applyForward(float[] x, float[] y)
          Applies this filter in the forward direction.
 void applyForwardReverse(float[] x, float[] y)
          Applies this filter in the forward and reverse directions.
 void applyFrf(float[] x, float[] y)
          For experimental use only.
 void applyFrr(float[] x, float[] y)
          For experimental use only.
 void applyReverse(float[] x, float[] y)
          Applies this filter in the reverse direction.
protected  void init(Cdouble[] poles, Cdouble[] zeros, double gain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveParallelFilter

public RecursiveParallelFilter(Cdouble[] poles,
                               Cdouble[] zeros,
                               double gain)
Constructs a recursive filter with specified poles, zeros, and gain. Any poles or zeros at zero (the origin of the complex z-plane) are ignored. The number of non-zero zeros cannot exceed the number of non-zero poles, and all poles must be unique.

Parameters:
poles - array of complex poles.
zeros - array of complex poles.
gain - the filter gain.

RecursiveParallelFilter

protected RecursiveParallelFilter()
Method Detail

applyForward

public void applyForward(float[] x,
                         float[] y)
Applies this filter in the forward direction. Input and output arrays must be distinct arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

applyReverse

public void applyReverse(float[] x,
                         float[] y)
Applies this filter in the reverse direction. Input and output arrays must be distinct arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

applyForwardReverse

public void applyForwardReverse(float[] x,
                                float[] y)
Applies this filter in the forward and reverse directions. Note that this method does not simply call the methods applyForward(float[],float[]) and applyReverse(float[],float[]) in sequence. Input and output arrays must be distinct arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply1Forward

public void apply1Forward(float[][] x,
                          float[][] y)
Applies this filter along the 1st dimension in the forward direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply1Reverse

public void apply1Reverse(float[][] x,
                          float[][] y)
Applies this filter along the 1st dimension in the reverse direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply1ForwardReverse

public void apply1ForwardReverse(float[][] x,
                                 float[][] y)
Applies this filter along the 1st dimension in the forward and reverse directions. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply2Forward

public void apply2Forward(float[][] x,
                          float[][] y)
Applies this filter along the 2nd dimension in the forward direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply2Reverse

public void apply2Reverse(float[][] x,
                          float[][] y)
Applies this filter along the 2nd dimension in the reverse direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply2ForwardReverse

public void apply2ForwardReverse(float[][] x,
                                 float[][] y)
Applies this filter along the 2nd dimension in the forward and reverse directions. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply1Forward

public void apply1Forward(float[][][] x,
                          float[][][] y)
Applies this filter along the 1st dimension in the forward direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply1Reverse

public void apply1Reverse(float[][][] x,
                          float[][][] y)
Applies this filter along the 1st dimension in the reverse direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply1ForwardReverse

public void apply1ForwardReverse(float[][][] x,
                                 float[][][] y)
Applies this filter along the 1st dimension in the forward and reverse directions. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply2Forward

public void apply2Forward(float[][][] x,
                          float[][][] y)
Applies this filter along the 2nd dimension in the forward direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply2Reverse

public void apply2Reverse(float[][][] x,
                          float[][][] y)
Applies this filter along the 2nd dimension in the reverse direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply2ForwardReverse

public void apply2ForwardReverse(float[][][] x,
                                 float[][][] y)
Applies this filter along the 2nd dimension in the forward and reverse directions. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply3Forward

public void apply3Forward(float[][][] x,
                          float[][][] y)
Applies this filter along the 3rd dimension in the forward direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply3Reverse

public void apply3Reverse(float[][][] x,
                          float[][][] y)
Applies this filter along the 3rd dimension in the reverse direction. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

apply3ForwardReverse

public void apply3ForwardReverse(float[][][] x,
                                 float[][][] y)
Applies this filter along the 3rd dimension in the forward and reverse directions. Input and output arrays must be distinct regular arrays. Lengths of the input and output arrays must be equal.

Parameters:
x - the input array.
y - the output array.

applyFrf

public void applyFrf(float[] x,
                     float[] y)
For experimental use only.


applyFrr

public void applyFrr(float[] x,
                     float[] y)
For experimental use only.


init

protected void init(Cdouble[] poles,
                    Cdouble[] zeros,
                    double gain)