public class FIRFilter extends Object implements InlineDataProcessor
| Modifier and Type | Class and Description |
|---|---|
class |
FIRFilter.FIROutput |
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
denumeratorCoefficients |
protected int |
impulseResponseLength |
protected int |
sliceLength |
protected double[] |
transformedIR |
| Modifier | Constructor and Description |
|---|---|
protected |
FIRFilter()
Create a new, uninitialised FIR filter.
|
|
FIRFilter(double[] impulseResponse)
Create a new Finite Impulse Response filter.
|
|
FIRFilter(double[] impulseResponse,
int len) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
apply(double[] signal)
Apply this filter to the given input signal.
|
DoubleDataSource |
apply(DoubleDataSource signal)
Apply this filter to the given input signal.
|
void |
applyInline(double[] data,
int off,
int len)
Perform some in-place processing on the given data.
|
double[] |
getDenumeratorCoefficients() |
int |
getImpulseResponseLength() |
protected void |
initialise(double[] impulseResponse,
int sliceLen)
Initialise the Finite Impulse Response filter.
|
protected double[] transformedIR
protected int impulseResponseLength
protected int sliceLength
protected double[] denumeratorCoefficients
protected FIRFilter()
initialise(double[] impulseResponse, int sliceLen) .public FIRFilter(double[] impulseResponse)
impulseResponse - the impulse response signalpublic FIRFilter(double[] impulseResponse,
int len)
protected void initialise(double[] impulseResponse,
int sliceLen)
impulseResponse - the impulse response signalsliceLen - the length of the slices in which to process the input data. IMPORTANT: impulseResponse.length+sliceLength must
be a power of two (256, 512, etc.)IllegalArgumentException - if the slice length is shorter than the impulse response length, or it the sum of both lengths is not a power
of two.public DoubleDataSource apply(DoubleDataSource signal)
signal - the signal to which this filter should be appliedpublic double[] apply(double[] signal)
signal - the signal to which this filter should be appliedpublic void applyInline(double[] data,
int off,
int len)
InlineDataProcessorapplyInline in interface InlineDataProcessordata - dataoff - offlen - lenpublic int getImpulseResponseLength()
public double[] getDenumeratorCoefficients()
Copyright © 2000–2016 DFKI GmbH. All rights reserved.