/**
         * Computes the Q matrix from the information stored in the QR matrix.  This
         * operation requires about 4(m<sup>2</sup>n-mn<sup>2</sup>+n<sup>3</sup>/3) flops.
         *
         * @param Q The orthogonal Q matrix.
         */
        //@Override
        public ZMatrixRMaj getQ(ZMatrixRMaj Q, bool compact)
        {
            if (compact)
            {
                Q = UtilDecompositons_ZDRM.checkIdentity(Q, numRows, minLength);
            }
            else
            {
                Q = UtilDecompositons_ZDRM.checkIdentity(Q, numRows, numRows);
            }

            for (int j = minLength - 1; j >= 0; j--)
            {
                QrHelperFunctions_ZDRM.extractHouseholderColumn(QR, j, numRows, j, u, 0);
                QrHelperFunctions_ZDRM.rank1UpdateMultR(Q, u, 0, gammas[j], j, j, numRows, v);
            }

            return(Q);
        }