public class LemireMinMaxFilter
extends java.lang.Object
Constructor and Description |
---|
LemireMinMaxFilter(int windowSize,
int dataLength,
boolean clampEdges)
Create a new min-max filter.
|
Modifier and Type | Method and Description |
---|---|
void |
filter(float[] array)
Run the filter.
|
float[] |
getMaxVal() |
float[] |
getMinVal() |
static void |
main(java.lang.String... args) |
public LemireMinMaxFilter(int windowSize, int dataLength, boolean clampEdges)
windowSize
- The size of the window, if clampEdges is true this should be odd.dataLength
- The length of the data to filterclampEdges
- If true the length of the resulting filtered values is as long as the data. Otherwise the length
of the filtered values is data.length - windowsize/2 + 1
. The data is extended with the values at the edges
to make this possible.public float[] getMinVal()
public float[] getMaxVal()
public void filter(float[] array)
array
- the data to filter. It should have the same length as given in the constructor.public static void main(java.lang.String... args)