121subroutine zqrshc(m,n,k,Q,ldq,R,ldr,i,j,w,rw)
124 integer,
intent(in) :: m, n, k, ldq, ldr, i, j
125 complex(real64),
intent(inout) :: Q(ldq,*), R(ldr,*)
126 complex(real64),
intent(out) :: w(*)
127 real(real64),
intent(out) :: rw(*)
128 external zcopy,zqrtv1,zqrqh,zqhqr,zqrot
131 if (m == 0 .or. n == 1)
return
138 else if (k /= m .and. (k /= n .or. n > m))
then
140 else if (i < 1 .or. i > n)
then
142 else if (j < 1 .or. j > n)
then
151 call zcopy(k,r(1,i),1,w,1)
153 call zcopy(k,r(1,l+1),1,r(1,l),1)
155 call zcopy(k,w,1,r(1,j),1)
159 call zqhqr(kk+1-i,n+1-i,r(i,i),ldr,rw,w)
161 call zqrot(
'F',m,kk+1-i,q(1,i),ldq,rw,w)
165 call zcopy(k,r(1,i),1,w,1)
167 call zcopy(k,r(1,l-1),1,r(1,l),1)
169 call zcopy(k,w,1,r(1,j),1)
175 call zqrtv1(kk+1-j,r(j,j),rw)
177 call zqrqh(kk+1-j,n-j,r(j,jj),ldr,rw,r(j+1,j))
179 call zqrot(
'B',m,kk+1-j,q(1,j),ldq,rw,r(j+1,j))
subroutine zqrot(dir, m, n, q, ldq, c, s)
Applies a sequence of Givens rotations from the right to a matrix.
subroutine zqrtv1(n, u, w)
Generates Givens rotations to eliminate all but the first element of a vector.
subroutine zqhqr(m, n, r, ldr, c, s)
Reduces an upper Hessenberg matrix to upper trapezoidal form.
subroutine zqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.
subroutine zqrshc(m, n, k, q, ldq, r, ldr, i, j, w, rw)
Updates a QR factorization after a circular shift of columns.