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);
    
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LTTBSampler()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      RectRegion run(@NonNull() XYSeries rawData, @NonNull() EditableXYSeries sampled)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait