
public class SumFilter extends AbstractFilter
| Modifier and Type | Class and Description |
|---|---|
private class |
SumFilter.PlainSum
Calculates the sum by adding all the elements in the array every time
|
private class |
SumFilter.SmartSum
Calculates the sum by maintaining a sum by substracting old samples and
adding new samples;
|
| Modifier and Type | Field and Description |
|---|---|
private SampleBuffer |
worker |
sampleSize, source| Constructor and Description |
|---|
SumFilter(SampleProvider source,
int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
fetchSample(float[] sample,
int offset)
Fetches a sample from a sensors or filter.
|
protected int |
getActualSize() |
sampleSizeprivate SampleBuffer worker
public SumFilter(SampleProvider source, int length)
public void fetchSample(float[] sample,
int offset)
SampleProviderfetchSample in interface SampleProviderfetchSample in class AbstractFiltersample - The array to store the sample in.offset - The elements of the sample are stored in the array starting at the offset position.protected int getActualSize()