Package science.aist.jack.math.filter
Class SlidingWindowMedian<T extends Comparable<T>>
- java.lang.Object
-
- science.aist.jack.math.filter.SlidingWindowMedian<T>
-
- All Implemented Interfaces:
GenericSlidingWindow<T,T>
,SlidingWindow<T>
- Direct Known Subclasses:
ZeroBufferedSlidingWindowMedian
public class SlidingWindowMedian<T extends Comparable<T>> extends Object implements SlidingWindow<T>
SlidingWindowMedian
Implementation of a median filter using sliding windows
A two heap approach is used as described in this blog post
- Since:
- 2.1.0
- Author:
- Rainer Meindl 16.09.2020
-
-
Constructor Summary
Constructors Constructor Description SlidingWindowMedian()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>
filter(List<T> data, int kernel)
Uses the kernel to group the data and filter the resulting subdatasets based on a filtering method
-
-
-
Method Detail
-
filter
public List<T> filter(List<T> data, int kernel)
Description copied from interface:SlidingWindow
Uses the kernel to group the data and filter the resulting subdatasets based on a filtering method
- Specified by:
filter
in interfaceGenericSlidingWindow<T extends Comparable<T>,T extends Comparable<T>>
- Specified by:
filter
in interfaceSlidingWindow<T extends Comparable<T>>
- Parameters:
data
- the data to filterkernel
- the kernel, or window size- Returns:
- a List of the filtered data
-
-