Package com.androidplot.xy
Class LTTBSampler
-
- All Implemented Interfaces:
-
com.androidplot.xy.Sampler
public class LTTBSampler implements Sampler
Adapted from: https://github.com/drcrane/downsample Note that this implementation does not yet support null values. Basic usage example:
// An instance of any implementation of XYSeries; SimpleXYSeries, etc: XYSeries origalSeries = ...; // Sampled series with half the resolution of the EditableXYSeries sampledSeries = new FixedSizeEditableXYSeries( origalSeries.getTitle(), origalSeries.size() / 2); // does the actual sampling: new LTTBSampler().run(origalSeries, sampledSeries);
-
-
Constructor Summary
Constructors Constructor Description LTTBSampler()
-
Method Summary
Modifier and Type Method Description RectRegionrun(@NonNull() XYSeries rawData, @NonNull() EditableXYSeries sampled)-
-
Method Detail
-
run
@NonNull() RectRegion run(@NonNull() XYSeries rawData, @NonNull() EditableXYSeries sampled)
- Returns:
min/max values encountered while processing input.
-
-
-
-