
private class SumFilter.SmartSum extends SampleBuffer
| Modifier and Type | Field and Description |
|---|---|
(package private) float[] |
latest |
(package private) int[] |
notRecalculated |
(package private) float[] |
oldest |
(package private) int |
recalculateIn |
(package private) float[] |
sum |
actualSize, bufferSize, currentPos, sampleBuffersampleSize, source| Modifier | Constructor and Description |
|---|---|
private |
SmartSum(SampleProvider source,
int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
fetchSample(float[] sample,
int off)
Fetches a sample from a sensors or filter.
|
private float |
recalculateSum(int index) |
getActualSize, getBufferSize, getOldest, toPossampleSizefloat[] sum
float[] oldest
float[] latest
int[] notRecalculated
int recalculateIn
private SmartSum(SampleProvider source, int length)
public void fetchSample(float[] sample,
int off)
SampleProviderfetchSample in interface SampleProviderfetchSample in class SampleBuffersample - The array to store the sample in.off - The elements of the sample are stored in the array starting at the offset position.private float recalculateSum(int index)