All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.bengreen.data.utility.DownSampleImpl Maven / Gradle / Ivy

Go to download

A high performance data logging and graphing system for time series data.

There is a newer version: 3.9
Show newest version
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