package org.simantics.history.csv; import java.util.ArrayList; import java.util.List; /** * Specifies the interpolation method to use when producing exported samples in * {@link CSVFormatter}. * * @author Tuukka Lehtonen * @see CSVFormatter */ public enum ExportInterpolation { /** * Directly take the last sample whose time stamp is less than or equal to * the sampling time. */ PREVIOUS_SAMPLE("Previous sample", "previous"), /** *
* v1 vs v2 * |----------------|--------------------| * t1 ts t2 ** * Here t1 and t2 are time stamps of those two * successive samples for which t1 ≤ ts ≤ * t2. * *
* The sampling result is then:
* vs = v1+(v2-v1)*(ts-t1)/(t2-t1).
*/
LINEAR_INTERPOLATION("Linear interpolation", "lerp");
public String label;
public String preference;
ExportInterpolation(String label, String preference) {
this.label = label;
this.preference = preference;
}
public static List