increment static method

void increment(
  1. List<int> array,
  2. List<double> errors
)

Implementation

static void increment(List<int> array, List<double> errors) {
  int index = 0;
  double biggestError = errors[0];
  for (int i = 1; i < array.length; i++) {
    if (errors[i] > biggestError) {
      biggestError = errors[i];
      index = i;
    }
  }
  array[index]++;
}