Package jisa.control
Class MedianMovingFilter
- java.lang.Object
-
- jisa.control.MedianMovingFilter
-
- All Implemented Interfaces:
ReadFilter
public class MedianMovingFilter extends java.lang.Object implements ReadFilter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jisa.control.ReadFilter
ReadFilter.Setupable
-
-
Field Summary
Fields Modifier and Type Field Description protected intcountprotected org.apache.commons.math.stat.descriptive.rank.Medianmedianprotected java.util.ArrayList<java.lang.Double>queueprotected ReadFilter.SetupablesetUpprotected Returnable<java.lang.Double>value
-
Constructor Summary
Constructors Constructor Description MedianMovingFilter(Returnable<java.lang.Double> v, ReadFilter.Setupable s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()intgetCount()doublegetValue()voidsetCount(int count)voidsetUp()
-
-
-
Field Detail
-
count
protected int count
-
value
protected Returnable<java.lang.Double> value
-
queue
protected java.util.ArrayList<java.lang.Double> queue
-
median
protected org.apache.commons.math.stat.descriptive.rank.Median median
-
setUp
protected ReadFilter.Setupable setUp
-
-
Constructor Detail
-
MedianMovingFilter
public MedianMovingFilter(Returnable<java.lang.Double> v, ReadFilter.Setupable s)
-
-
Method Detail
-
getValue
public double getValue() throws java.io.IOException, DeviceException- Specified by:
getValuein interfaceReadFilter- Throws:
java.io.IOExceptionDeviceException
-
setCount
public void setCount(int count)
- Specified by:
setCountin interfaceReadFilter
-
getCount
public int getCount()
- Specified by:
getCountin interfaceReadFilter
-
clear
public void clear()
- Specified by:
clearin interfaceReadFilter
-
setUp
public void setUp() throws java.io.IOException, DeviceException- Specified by:
setUpin interfaceReadFilter- Throws:
java.io.IOExceptionDeviceException
-
-