docs: public static int argmax(double[] v) {
      assert (v.length > 0);
      int maxIndex = 0;
      double currentMax = v[0];
      for(int i = 1; i < v.length; i++) {
        final double x = v[i];
        if(x > currentMax) {
          maxIndex = i;
          currentMax = x;
        }
      }
      return maxIndex;
    }