docs: public static void permuteSymmetric( DMatrixSparseCSC input, int permInv[], DMatrixSparseCSC output ,
                                           @Nullable IGrowArray gw ) {
          if( input.numRows != input.numCols )
              throw new MatrixDimensionException("Input must be a square matrix. "+stringShapes(input,output));
          if( input.numRows != permInv.length )
              throw new MatrixDimensionException("Number of column in input must match length of permInv");
  
          int N = input.numCols;
  
          int w[] = adjustClear(gw,N); // histogram with column counts
  
          output.reshape(N,N,0);
          output.indicesSorted = false;
          output.col_idx[0] = 0;
  
          // determine column counts for output
          for (int j = 0; j < N; j++) {
              int j2 = permInv[j];
              int idx0 = input.col_idx[j];
              int idx1 = input.col_idx[j+1];
  
              for (int p = idx0; p < idx1; p++) {
                  int i = input.nz_rows[p];
                  if( i > j ) // ignore the lower triangular portion
                      continue;
                  int i2 = permInv[i];
  
                  w[i2>j2?i2:j2]++;
              }
          }
  
          // update structure of output
          output.histogramToStructure(w);
          System.arraycopy(output.col_idx,0,w,0,output.numCols);
  
          for (int j = 0; j < N; j++) {
              // column j of Input is row j2 of Output
              int j2 = permInv[j];
              int idx0 = input.col_idx[j];
              int idx1 = input.col_idx[j+1];
  
              for (int p = idx0; p < idx1; p++) {
                  int i = input.nz_rows[p];
                  if( i > j ) // ignore the lower triangular portion
                      continue;
  
                  int i2 = permInv[i];
                  // row i of Input is row i2 of Output
                  int q = w[i2>j2?i2:j2]++;
                  output.nz_rows[q] = i2<j2?i2:j2;
                  output.nz_values[q] = input.nz_values[p];
              }
          }
      }