public static double[] variation(double[] origin) {
    int n = origin.length;
    double[] variance = new double[n - 1];
    for (int i = 0; i < n - 1; i++) {
      variance[i] = origin[i + 1] - origin[i];
    }
    return variance;
  }
calculate 1-order difference of input series.

@param origin original series
@return 1-order difference
library-udf/src/main/java/org/apache/iotdb/library/util/Util.java