docs: public static <A> int getIndexOfMaximum(A array, NumberArrayAdapter<?, A> adapter) throws IndexOutOfBoundsException {
      final int size = adapter.size(array);
      int index = 0;
      double max = adapter.getDouble(array, 0);
      for (int i = 1; i < size; i++) {
        double val = adapter.getDouble(array, i);
        if (val > max) {
          max = val;
          index = i;
        }
      }
      return index;
    }