code: public static DenseMatrix random(int rows, int cols, Random rand)
      {
          DenseMatrix m = new DenseMatrix(rows, cols);
          for(int i = 0; i < rows; i++)
              for(int j = 0; j < cols; j++)
                  m.set(i, j, rand.nextDouble());
          
          return m;
      }
docs: Creates a new dense matrix filled with random values from
  {@link Random#nextDouble() }
  
  @param rows the number of rows for the matrix
  @param cols the number of columns for the matrix
  @param rand the source of randomness
  @return a new dense matrix full of random values