org.mbari.siam.utils
Class WeightedAverageFilter
java.lang.Object
org.mbari.siam.utils.Filter
org.mbari.siam.utils.WeightedAverageFilter
public class WeightedAverageFilter
- extends Filter
This filter produces an instantaneous (no memory) weighted average of its inputs.
The output is recalculated whenever any of the inputs changes.
|
Method Summary |
protected int |
doFilterAction(double value)
Perform the filter function with the new input value. |
int |
getDivisor()
get divisor value |
void |
setDivisor(int divisor)
set divisor value |
| Methods inherited from class org.mbari.siam.utils.Filter |
addInput, addInputs, attach, doubleValue, floatValue, getID, getInput, getInput, indexOf, inputCount, inputGate, intValue, longValue, name, outputGate, removeAllInputs, removeInput, reset, setID, setName, toString, triggerIn, triggerOut |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WeightedAverageFilter
public WeightedAverageFilter()
WeightedAverageFilter
public WeightedAverageFilter(java.lang.String name,
int id)
WeightedAverageFilter
public WeightedAverageFilter(java.util.Vector inputs)
WeightedAverageFilter
public WeightedAverageFilter(java.lang.String name,
java.util.Vector inputs)
throws InvalidPropertyException
- Throws:
InvalidPropertyException
WeightedAverageFilter
public WeightedAverageFilter(int id,
java.util.Vector inputs)
throws InvalidPropertyException
- Throws:
InvalidPropertyException
WeightedAverageFilter
public WeightedAverageFilter(java.lang.String name,
int id,
java.util.Vector inputs)
throws InvalidPropertyException
- Throws:
InvalidPropertyException
WeightedAverageFilter
public WeightedAverageFilter(java.lang.String name,
int id,
java.util.Vector inputs,
int divisor)
throws InvalidPropertyException
- Throws:
InvalidPropertyException
setDivisor
public void setDivisor(int divisor)
- set divisor value
getDivisor
public int getDivisor()
- get divisor value
doFilterAction
protected int doFilterAction(double value)
- Perform the filter function with the new input value.
Sets member variable _filterValue, which will be passed
to the output by triggerOut() if the output gating
conditions are met.
Overrides base class default.
- Specified by:
doFilterAction in class Filter
Copyright © 2003 MBARI.
The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.