code: public static double min(double[][] values) {
      double min = Double.MAX_VALUE;
      for (int i = 0; i < values.length; i++) {
        for (int j = 0; j < values[i].length; j++) {
          min = (values[i][j] < min) ? values[i][j] : min;
        }
      }
      return min;
    }
docs: Finds and returns the minimum value in a 2-dimensional array of doubles.
  
  @param values the data to use.
  
  @return the smallest value in the array.