code: public Cholesky CholeskyOfAtA() {
          int n = qr.ncols();
  
          DenseMatrix L = Matrix.zeros(n, n);
          for (int i = 0; i < n; i++) {
              L.set(i, i, tau[i]);
  
              for (int j = 0; j < i; j++) {
                  L.set(i, j, qr.get(j, i));
              }
          }
  
          return new Cholesky(L);
      }
docs: Returns the Cholesky decomposition of A'A.