public ZMatrixRMaj getQ(ZMatrixRMaj Q ) {
        Q = UtilDecompositons_ZDRM.checkIdentity(Q,N,N);

        Arrays.fill(u,0,N*2,0);
        for( int j = N-2; j >= 0; j-- ) {
            QrHelperFunctions_ZDRM.extractHouseholderColumn(QH,j+1,N,j,u,0);
            QrHelperFunctions_ZDRM.rank1UpdateMultR(Q, u, 0,gammas[j], j + 1, j + 1, N, b);
        }

        return Q;
    }
public ZMatrixRMaj getQ ( ZMatrixRMaj Q ) { Q = UtilDecompositons_ZDRM . checkIdentity ( Q , N , N ) ; Arrays . fill ( u , 0 , N * 2 , 0 ) ; for ( int j = N - 2 ; j >= 0 ; j -- ) { QrHelperFunctions_ZDRM . extractHouseholderColumn ( QH , j + 1 , N , j , u , 0 ) ; QrHelperFunctions_ZDRM . rank1UpdateMultR ( Q , u , 0 , gammas [ j ] , j + 1 , j + 1 , N , b ) ; } return Q ; }
An orthogonal matrix that has the following property: H = Q<sup>T</sup>AQ

@param Q If not null then the results will be stored here.  Otherwise a new matrix will be created.
@return The extracted Q matrix.