eu.bengreen.data.utility

## Class DownSampleImpl

- java.lang.Object
- - eu.bengreen.data.utility.DownSampleImpl

- All Implemented Interfaces:
    DownSampler
  Direct Known Subclasses:
    LargestTriangleThreeBuckets, LargestTriangleThreeBucketsTime

      public abstract class DownSampleImpl
      extends Object
      implements DownSampler

  Naive implementation of down sample with simple array input Largest-Triangle-Three-Buckets, from Sveinn Steinarsson's thesis, section 4.2..

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.rrd4j.graph.DownSampler

      `DownSampler.DataSet`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `threshold`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DownSampleImpl(int threshold)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DownSampler.DataSet` | `downsize(long[] timestamps, double[] values)`
    `protected abstract DownSampler.DataSet` | `downsizeImpl(DownSampler.DataSet sampled, long[] timestamps, double[] values)`
    `protected void` | `setDataSetLine(DownSampler.DataSet sampled, int rank, long timestamp, double value)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### threshold

          protected final int threshold

  - ### Constructor Detail

    - #### DownSampleImpl

          protected DownSampleImpl(int threshold)

  - ### Method Detail

    - #### downsize

          public DownSampler.DataSet downsize(long[] timestamps,
                                              double[] values)

      Specified by:
        `downsize` in interface `DownSampler`

    - #### downsizeImpl

          protected abstract DownSampler.DataSet downsizeImpl(DownSampler.DataSet sampled,
                                                              long[] timestamps,
                                                              double[] values)

    - #### setDataSetLine

          protected void setDataSetLine(DownSampler.DataSet sampled,
                                        int rank,
                                        long timestamp,
                                        double value)