X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.history%2Fsrc%2Forg%2Fsimantics%2Fhistory%2Fcsv%2FExportInterpolation.java;h=5295ee08feea746a2c9678a334575794a11a2ad3;hb=9df6e0be9b9df41cd66a74e54ac70407a62ff4a1;hp=b0cad53b5e4b444d4c7fd24ea2b282deda9e800a;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.history/src/org/simantics/history/csv/ExportInterpolation.java b/bundles/org.simantics.history/src/org/simantics/history/csv/ExportInterpolation.java index b0cad53b5..5295ee08f 100644 --- a/bundles/org.simantics.history/src/org/simantics/history/csv/ExportInterpolation.java +++ b/bundles/org.simantics.history/src/org/simantics/history/csv/ExportInterpolation.java @@ -1,70 +1,70 @@ -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:
- *
+ * 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
+ * v1 vs v2
+ * |----------------|--------------------|
+ * t1 ts t2
+ *
+ *
+ * Here t1 and t2 are time stamps of those two
+ * successive samples for which t1 ≤ ts ≤
+ * t2.
+ *
+ * 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