code: public DMatrixRMaj getQ() {
          Equation eq = new Equation();
  
          DMatrixRMaj Q = CommonOps_DDRM.identity(QR.numRows);
          DMatrixRMaj u = new DMatrixRMaj(QR.numRows,1);
  
          int N = Math.min(QR.numCols,QR.numRows);
  
          eq.alias(u,"u",Q,"Q",QR,"QR",QR.numRows,"r");
  
          // compute Q by first extracting the householder vectors from the columns of QR and then applying it to Q
          for( int j = N-1; j>= 0; j-- ) {
              eq.alias(j,"j",gammas[j],"gamma");
  
              eq.process("u(j:,0) = [1 ; QR((j+1):,j)]");
              eq.process("Q=(eye(r)-gamma*u*u')*Q");
          }
  
          return Q;
      }
docs: Returns the Q matrix.