code: public static Basic1DMatrix randomSymmetric(int size, Random random) {
          double[] array = new double[size * size];
  
          for (int i = 0; i < size; i++) {
              for (int j = i; j < size; j++) {
                  double value = random.nextDouble();
                  array[i * size + j] = value;
                  array[j * size + i] = value;
              }
          }
  
          return new Basic1DMatrix(size, size, array);
      }
docs: Creates a random symmetric {@link Basic1DMatrix} of the given {@code size}.