code: public static double[][] pdist(double[][] x) {
          int n = x.length;
  
          double[][] dist = new double[n][n];
          pdist(x, dist, false, false);
  
          return dist;
      }
docs: Pairwise distance between pairs of objects.
  @param x Rows of x correspond to observations, and columns correspond to variables.
  @return a full pairwise distance matrix.