Package lejos.robotics.filter
Class MinimumFilter
- java.lang.Object
-
- lejos.robotics.filter.AbstractFilter
-
- lejos.robotics.filter.SampleBuffer
-
- lejos.robotics.filter.MinimumFilter
-
- All Implemented Interfaces:
SampleProvider
public class MinimumFilter extends SampleBuffer
This filter returns the minimum values found in the N most recent samples.
The number of samples used is specified in the constructor of the filter.- Author:
- Aswin
-
-
Field Summary
-
Fields inherited from class lejos.robotics.filter.AbstractFilter
sampleSize, source
-
-
Constructor Summary
Constructors Constructor Description MinimumFilter(SampleProvider source, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfetchSample(float[] sample, int off)Fetches a sample from a sensor or filter.-
Methods inherited from class lejos.robotics.filter.SampleBuffer
getActualSize, getBufferSize, getOldest
-
Methods inherited from class lejos.robotics.filter.AbstractFilter
sampleSize
-
-
-
-
Constructor Detail
-
MinimumFilter
public MinimumFilter(SampleProvider source, int bufferSize)
-
-
Method Detail
-
fetchSample
public void fetchSample(float[] sample, int off)Description copied from interface:SampleProviderFetches a sample from a sensor or filter.- Specified by:
fetchSamplein interfaceSampleProvider- Overrides:
fetchSamplein classSampleBuffer- Parameters:
sample- The array to store the sample in.off- The elements of the sample are stored in the array starting at the offset position.
-
-