docs: public static <V extends NumberVector> V randomVector(NumberVector.Factory<V> factory, int dim, Random r) {
      double[] data = new double[dim];
      for(int i = 0; i < dim; i++) {
        data[i] = r.nextDouble();
      }
      return factory.newNumberVector(data);
    }