Get the max distance length that matches the tile widths and heights

@param widths
sorted tile matrix widths
@param heights
sorted tile matrix heights
@return max length
@since 1.2.0
962301
public static double getMaxLength(double[] widths, double[] heights) {
		double maxWidth = getMaxLength(widths);
		double maxHeight = getMaxLength(heights);
		double maxLength = Math.min(maxWidth, maxHeight);
		return maxLength;
	}
732706
private Pair<EnumFacing, Point> getClosest(List<Pair<EnumFacing, Point>> points)
	{
		double distance = Double.MAX_VALUE;
		Pair<EnumFacing, Point> ret = null;
		for (Pair<EnumFacing, Point> pair : points)
		{
			double d = Point.distanceSquared(src, pair.getRight());
			if (distance > d)
			{
				distance = d;
				ret = pair;
			}
		}

		return ret;
	}
696651
private static List<Integer> getMaxColumnSizes(List<String[]> resultSet) {
    List<Integer> maxColumnSizes = Lists.newArrayList();
    for (int i = 0; i < resultSet.get(0).length; i++) {
      int maxColumnSize = -1;
      for (int j = 0; j < resultSet.size(); j++) {
        if (resultSet.get(j)[i].length() > maxColumnSize) {
          maxColumnSize = resultSet.get(j)[i].length();
        }
      }
      maxColumnSizes.add(maxColumnSize);
    }
    return maxColumnSizes;
  }
387980
public function getMaxLineLength($lines)
    {
        if (!is_array($lines)) {
            $lines = explode("\n", $lines);
        }
        $lineLength = 0;
        // find the longest line
        foreach ($lines as $line) {
            $currentLineLength = strlen($line);
            if ($currentLineLength > $lineLength) {
                $lineLength = $currentLineLength;
            }
        }
        return $lineLength;
    }
391050
@Pure
	public static double max(double... values) {
		if (values == null || values.length == 0) {
			return Double.NaN;
		}
		double max = values[0];
		for (final double v : values) {
			if (v > max) {
				max = v;
			}
		}
		return max;
	}
800369
public static long[][] getRange(Map<String, String> headers) {
		String rangeValue = getHeaderValue(headers, HTTP_RANGE_HEADER_UP);
		if (rangeValue == null) return null;
		rangeValue = rangeValue.trim();
		return parseRanges(rangeValue);
	}
1012048
private static String getDataTemplate(int[] widths) {
        return IntStream.range(0, widths.length)
                .mapToObj(i -> " %" + (i + 1) + "$" + widths[i] + "s  |")
                .reduce((left, right) -> left + " " + right)
                .orElse("");
    }
500966
public static long max(final long[] values) {
		long max = Long.MIN_VALUE;
		if (values.length > 0) {
			max = values[0];

			for (int i = 0; i < values.length; ++i) {
				if (values[i] > max) {
					max = values[i];
				}
			}
		}

		return max;
	}
1185758
public static Rectangle getTile (
        int width, int height, int tileWidth, int tileHeight, int tileIndex)
    {
        Rectangle bounds = new Rectangle();
        getTile(width, height, tileWidth, tileHeight, tileIndex, bounds);
        return bounds;
    }
372014
public static Long getClosestZoomLevel(double[] widths, double[] heights,
			List<TileMatrix> tileMatrices, double length) {
		return getZoomLevel(widths, heights, tileMatrices, length, false);
	}
501386
@Pure
	public static int max(int... values) {
		if (values == null || values.length == 0) {
			return 0;
		}
		int max = values[0];
		for (final int v : values) {
			if (v > max) {
				max = v;
			}
		}
		return max;
	}
762106
public static int validateGeohashMaxLevels(Integer userMaxLevels, int defaultMaxLevels) {
        int maxLevels = userMaxLevels == null ? defaultMaxLevels : userMaxLevels;
        if (maxLevels < 1 || maxLevels > GeohashPrefixTree.getMaxLevelsPossible()) {
            throw new IndexException("max_levels must be in range [1, {}], but found {}",
                                     GeohashPrefixTree.getMaxLevelsPossible(),
                                     maxLevels);
        }
        return maxLevels;
    }
470554
public static int[] getMaxIndexes (int[] values)
    {
        int max = Integer.MIN_VALUE;
        int num = 0;
        int vcount = (values == null) ? 0 : values.length;

        for (int ii=0; ii < vcount; ii++) {
            int value = values[ii];

            if (value < max) {
                // common case- stop checking things..
                continue;

            } else if (value > max) {
                // new max
                max = value;
                num = 1;

            } else {
                // another sighting of max
                num++;
            }
        }

        // now find the indexes that have max
        int[] maxes = new int[num];
        for (int ii=0, pos=0; pos < num; ii++) {
            if (values[ii] == max) {
                maxes[pos++] = ii;
            }
        }

        return maxes;
    }
340725
private function getLongestPath($paths)
    {
        return array_reduce($paths, function ($a, $b) {
            return strlen($a) > strlen($b) ? $a : $b;
        });

//        return max(array_map('strlen', $paths));
    }
1153219
private List<Integer> getColumnMaxWidths() {
    int numCols = data.get(0).size();
    int[] widths = new int[numCols];

    if (this.labels != null) {
      for (int i=0; i<numCols; i++) {
        widths[i] = this.labels.get(i).length();
      }
    }

    for (List<String> row : this.data) {
      for (int i=0;i<row.size(); i++) {
        if (row.get(i) == null) {
          widths[i] = Math.max(widths[i], 4);
        } else {
          widths[i] = Math.max(widths[i], row.get(i).length());
        }
      }
    }

    return Ints.asList(widths);
  }
714853
public static int getMaxValueIndex (int[] values)
    {
        if (values == null || values.length == 0) {
            return -1;
        }

        int idx = 0;
        int max = values[idx];
        for (int ii = 1; ii < values.length; ii++) {
            if (values[ii] > max) {
                max = values[ii];
                idx = ii;
            }
        }
        return idx;
    }
1293399
public static long[] getMaxShape(INDArray...inputs) {
        if(inputs == null)
            return null;
        else if(inputs.length < 2)
            return inputs[0].shape();
        else {
            long[] currMax = inputs[0].shape();
            for(int i = 1; i <  inputs.length; i++) {
                if(inputs[i] == null) {
                    continue;
                }
                if(ArrayUtil.prod(currMax) < inputs[i].length()) {
                    currMax = inputs[i].shape();
                }
            }

            return currMax;
        }
    }