public class Recursive2ndOrderFilter
extends java.lang.Object
Application of the filter in the forward direction computes
y[i] = b0*x[i]+b1*x[i-1]+b2*x[i-2]-a1*y[i-1]-a2*y[i-2],for i = 0, 1, 2, ..., n-1, where x[i] = y[i] = 0 for i<0. Application of the filter in the reverse direction computes
y[i] = b0*x[i]+b1*x[i+1]+b2*x[i+2]-a1*y[i+1]-a2*y[i+2],for i = n-1, n-2, ..., 0, where x[i] = y[i] = 0 for i>=n.
Constructor and Description |
---|
Recursive2ndOrderFilter(Cdouble pole1,
Cdouble pole2,
Cdouble zero1,
Cdouble zero2,
double gain)
Constructs a recursive 2nd-order filter from poles, zeros, and gain.
|
Recursive2ndOrderFilter(double pole,
double zero,
double gain)
Constructs a recursive 2nd-order filter from pole, zero, and gain.
|
Recursive2ndOrderFilter(float b0,
float b1,
float b2,
float a1,
float a2)
Constructs a recursive 2nd-order filter with specified coefficients.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate1Forward(float[][][] x,
float[][][] y)
Accumulates output in 1st dimension in the forward direction.
|
void |
accumulate1Forward(float[][] x,
float[][] y)
Accumulates output in 1st dimension in the forward direction.
|
void |
accumulate1Reverse(float[][][] x,
float[][][] y)
Accumulates output in 1st dimension in the reverse direction.
|
void |
accumulate1Reverse(float[][] x,
float[][] y)
Accumulates output in 1st dimension in the reverse direction.
|
void |
accumulate2Forward(float[][][] x,
float[][][] y)
Accumulates output in 2nd dimension in the forward direction.
|
void |
accumulate2Forward(float[][] x,
float[][] y)
Accumulates output in 2nd dimension in the forward direction.
|
void |
accumulate2Reverse(float[][][] x,
float[][][] y)
Accumulates output in 2nd dimension in the reverse direction.
|
void |
accumulate2Reverse(float[][] x,
float[][] y)
/**
Accumulates output in 2nd dimension in the reverse direction.
|
void |
accumulate3Forward(float[][][] x,
float[][][] y)
Accumulates output in 3rd dimension in the forward direction.
|
void |
accumulate3Reverse(float[][][] x,
float[][][] y)
/**
Accumulates output in 3rd dimension in the reverse direction.
|
void |
accumulateForward(float[] x,
float[] y)
Applies this filter in the forward direction, accumulating the output.
|
void |
accumulateReverse(float[] x,
float[] y)
Applies this filter in the reverse direction, accumulating the output.
|
void |
apply1Forward(float[][][] x,
float[][][] y)
Applies this filter in 1st dimension in the forward direction.
|
void |
apply1Forward(float[][] x,
float[][] y)
Applies this filter in 1st dimension in the forward direction.
|
void |
apply1Reverse(float[][][] x,
float[][][] y)
Applies this filter in 1st dimension in the reverse direction.
|
void |
apply1Reverse(float[][] x,
float[][] y)
Applies this filter in 1st dimension in the reverse direction.
|
void |
apply2Forward(float[][][] x,
float[][][] y)
Applies this filter in 2nd dimension in the forward direction.
|
void |
apply2Forward(float[][] x,
float[][] y)
Applies this filter in 2nd dimension in the forward direction.
|
void |
apply2Reverse(float[][][] x,
float[][][] y)
Applies this filter in 2nd dimension in the reverse direction.
|
void |
apply2Reverse(float[][] x,
float[][] y)
Applies this filter in 2nd dimension in the reverse direction.
|
void |
apply3Forward(float[][][] x,
float[][][] y)
Applies this filter in 3rd dimension in the forward direction.
|
void |
apply3Reverse(float[][][] x,
float[][][] y)
Applies this filter in 3rd dimension in the reverse direction.
|
void |
applyForward(float[] x,
float[] y)
Applies this filter in the forward direction.
|
void |
applyReverse(float[] x,
float[] y)
Applies this filter in the reverse direction.
|
public Recursive2ndOrderFilter(float b0, float b1, float b2, float a1, float a2)
b0
- a filter coefficient.b1
- a filter coefficient.b2
- a filter coefficient.a1
- a filter coefficient.a2
- a filter coefficient.public Recursive2ndOrderFilter(double pole, double zero, double gain)
pole
- the pole.zero
- the zero.gain
- the filter gain.public Recursive2ndOrderFilter(Cdouble pole1, Cdouble pole2, Cdouble zero1, Cdouble zero2, double gain)
pole1
- the 1st pole.pole2
- the 2nd pole.zero1
- the 1st zero.zero2
- the 2nd zero.gain
- the filter gain.public void applyForward(float[] x, float[] y)
Input and output arrays may be the same array, but must have equal lengths.
x
- the input array.y
- the output array.public void applyReverse(float[] x, float[] y)
Input and output arrays may be the same array, but must have equal lengths.
x
- the input array.y
- the output array.public void accumulateForward(float[] x, float[] y)
Input and output arrays may be the same array, but must have equal lengths.
x
- the input array.y
- the output array.public void accumulateReverse(float[] x, float[] y)
Input and output arrays may be the same array, but must have equal lengths.
x
- the input array.y
- the output array.public void apply1Forward(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply1Reverse(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply2Forward(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply2Reverse(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate1Forward(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate1Reverse(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate2Forward(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate2Reverse(float[][] x, float[][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply1Forward(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply1Reverse(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply2Forward(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply2Reverse(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply3Forward(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void apply3Reverse(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate1Forward(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate1Reverse(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate2Forward(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate2Reverse(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate3Forward(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.public void accumulate3Reverse(float[][][] x, float[][][] y)
Input and output arrays may be the same array, but must be regular and have equal lengths.
x
- the input array.y
- the output array.