double maxValue(Matrix matrix) { List<int> location = maxIndex(matrix); return matrix.getAt(location[0], location[1]); }