code: public static BasicVector random(int length, Random random) {
          double[] array = new double[length];
          for (int i = 0; i < length; i++) {
              array[i] = random.nextDouble();
          }
  
          return new BasicVector(array);
      }
docs: Creates a random {@link BasicVector} of the given {@code length} with
  the given {@code Random}.