code: public double min(double[] series) {
      double min = Double.MAX_VALUE;
      for (int i = 0; i < series.length; i++) {
        if (min > series[i]) {
          min = series[i];
        }
      }
      return min;
    }
docs: Finds the minimal value in timeseries.
  
  @param series The timeseries.
  @return The min value.