code: public Matrix getP() {
          Matrix P = new DenseMatrix(jpvt.length, jpvt.length);
          for (int i = 0; i < jpvt.length; i++) {
              P.set(jpvt[i], i, 1);
          }
          return P;
      }
docs: Returns the column pivoting matrix. This function allocates a new Matrix
  to be returned, a more cheap option is tu use {@link #getPVector()}.