
eu.bengreen.data.utility.DownSampleImpl Maven / Gradle / Ivy
package eu.bengreen.data.utility;
import org.rrd4j.graph.DownSampler;
/**
* Naive implementation of down sample with simple array input Largest-Triangle-Three-Buckets, from Sveinn Steinarsson's thesis, section 4.2..
*
* @author Benjamin Green
*/
public abstract class DownSampleImpl implements DownSampler {
protected final int threshold;
protected DownSampleImpl(int threshold) {
this.threshold = threshold;
}
protected void setDataSetLine(DownSampler.DataSet sampled, int rank, long timestamp, double value) {
sampled.timestamps[rank] = timestamp;
sampled.values[rank] = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy