@PublicationReference(author="Wikipedia", title="Infinite impulse response", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Infinite_impulse_response") public class AutoRegressiveMovingAverageFilter extends AbstractStatefulEvaluator<java.lang.Double,java.lang.Double,DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>>> implements DiscreteTimeFilter<DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>>>
Constructor and Description |
---|
AutoRegressiveMovingAverageFilter(double[] autoRegressiveCoefficients,
double[] movingAverageCoefficients)
Creates a new instance of AutoRegressiveMovingAverageFilter
|
AutoRegressiveMovingAverageFilter(int numAutoregressiveCoefficients,
int numMovingAverageCoefficients)
Creates a new instance of AutoRegressiveMovingAverageFilter
|
AutoRegressiveMovingAverageFilter(Vector autoRegressiveCoefficients,
Vector movingAverageCoefficients)
Creates a new instance of AutoRegressiveMovingAverageFilter
|
Modifier and Type | Method and Description |
---|---|
AutoRegressiveMovingAverageFilter |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
void |
convertFromVector(Vector parameters)
Converts the object from a Vector of parameters.
|
Vector |
convertToVector()
Converts the object to a vector.
|
DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>> |
createDefaultState()
Creates a new default state object.
|
java.lang.Double |
evaluate(java.lang.Double input)
Evaluates the object using the given input and current state objects,
returning the output.
|
Vector |
getAutoRegressiveCoefficients()
Getter for autoregressiveCoefficients
|
Vector |
getMovingAverageCoefficients()
Setter for movingAverageCoefficients
|
int |
getNumAutoRegressiveCoefficients()
Gets the number of autoregressive coefficients.
|
int |
getNumMovingAverageCoefficients()
Returns the number of coefficients in the moving-average filter.
|
void |
setAutoregressiveCoefficients(Vector autoRegressiveCoefficients)
Setter for autoregressiveCoefficients
|
void |
setMovingAverageCoefficients(Vector movingAverageCoefficients)
Setter for movingAverageCoefficients
|
evaluate, getState, resetState, setState
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluate, getState, resetState, setState
public AutoRegressiveMovingAverageFilter(int numAutoregressiveCoefficients, int numMovingAverageCoefficients)
numAutoregressiveCoefficients
- Number of autoregressive coefficients.numMovingAverageCoefficients
- Number of moving-average coefficients.public AutoRegressiveMovingAverageFilter(double[] autoRegressiveCoefficients, double[] movingAverageCoefficients)
autoRegressiveCoefficients
- Coefficients of the autoregressive filter. Element 0 is applied to the
most-recent output, Element 1 is applied to the second-most-recent,
and so forth. The dimensionality of the Vector is the order of the
filter.movingAverageCoefficients
- Coefficients of the moving-average filter. Element 0 is applied to the
most-recent input, Element 1 is applied to the second-most-recent,
and so forth. The dimensionality of the Vector is the order of the
filter.public AutoRegressiveMovingAverageFilter(Vector autoRegressiveCoefficients, Vector movingAverageCoefficients)
autoRegressiveCoefficients
- Coefficients of the autoregressive filter. Element 0 is applied to the
most-recent output, Element 1 is applied to the second-most-recent,
and so forth. The dimensionality of the Vector is the order of the
filter.movingAverageCoefficients
- Coefficients of the moving-average filter. Element 0 is applied to the
most-recent input, Element 1 is applied to the second-most-recent,
and so forth. The dimensionality of the Vector is the order of the
filter.public DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>> createDefaultState()
StatefulEvaluator
createDefaultState
in interface StatefulEvaluator<java.lang.Double,java.lang.Double,DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>>>
public java.lang.Double evaluate(java.lang.Double input)
StatefulEvaluator
evaluate
in interface Evaluator<java.lang.Double,java.lang.Double>
evaluate
in interface StatefulEvaluator<java.lang.Double,java.lang.Double,DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>>>
input
- The input to evaluate.public AutoRegressiveMovingAverageFilter clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface Vectorizable
clone
in interface CloneableSerializable
clone
in class AbstractStatefulEvaluator<java.lang.Double,java.lang.Double,DefaultPair<FiniteCapacityBuffer<java.lang.Double>,FiniteCapacityBuffer<java.lang.Double>>>
public Vector convertToVector()
Vectorizable
convertToVector
in interface Vectorizable
public void convertFromVector(Vector parameters)
Vectorizable
convertFromVector
in interface Vectorizable
parameters
- The parameters to incorporate.public int getNumMovingAverageCoefficients()
public Vector getMovingAverageCoefficients()
public void setMovingAverageCoefficients(Vector movingAverageCoefficients)
movingAverageCoefficients
- Coefficients of the moving-average filter. Element 0 is applied to the
most-recent input, Element 1 is applied to the second-most-recent,
and so forth. The dimensionality of the Vector is the order of the
filter.public int getNumAutoRegressiveCoefficients()
public Vector getAutoRegressiveCoefficients()
public void setAutoregressiveCoefficients(Vector autoRegressiveCoefficients)
autoRegressiveCoefficients
- Coefficients of the autoregressive filter. Element 0 is applied to the
most-recent output, Element 1 is applied to the second-most-recent,
and so forth. The dimensionality of the Vector is the order of the
filter.