code: public static double[] random(double lo, double hi, int n) {
          double[] x = new double[n];
          random.get().nextDoubles(x, lo, hi);
          return x;
      }
docs: Generate n uniform random numbers in the range [lo, hi).
  @param n size of the array
  @param lo lower limit of range
  @param hi upper limit of range
  @return a uniform random real in the range [lo, hi)