121subroutine cqrshc(m,n,k,Q,ldq,R,ldr,i,j,w,rw)
124 integer,
intent(in) :: m, n, k, ldq, ldr, i, j
125 complex(real32),
intent(inout) :: Q(ldq,*)
126 complex(real32),
intent(inout) :: R(ldr,*)
127 complex(real32),
intent(out) :: w(*)
128 real(real32),
intent(out) :: rw(*)
129 external ccopy,cqrtv1,cqrqh,cqhqr,cqrot
132 if (m == 0 .or. n == 1)
return
139 else if (k /= m .and. (k /= n .or. n > m))
then
141 else if (i < 1 .or. i > n)
then
143 else if (j < 1 .or. j > n)
then
152 call ccopy(k,r(1,i),1,w,1)
154 call ccopy(k,r(1,l+1),1,r(1,l),1)
156 call ccopy(k,w,1,r(1,j),1)
160 call cqhqr(kk+1-i,n+1-i,r(i,i),ldr,rw,w)
162 call cqrot(
'F',m,kk+1-i,q(1,i),ldq,rw,w)
166 call ccopy(k,r(1,i),1,w,1)
168 call ccopy(k,r(1,l-1),1,r(1,l),1)
170 call ccopy(k,w,1,r(1,j),1)
176 call cqrtv1(kk+1-j,r(j,j),rw)
178 call cqrqh(kk+1-j,n-j,r(j,jj),ldr,rw,r(j+1,j))
180 call cqrot(
'B',m,kk+1-j,q(1,j),ldq,rw,r(j+1,j))
subroutine cqrot(dir, m, n, q, ldq, c, s)
Applies a sequence of Givens rotations from the right to a matrix.
subroutine cqrtv1(n, u, w)
Generates Givens rotations to eliminate all but the first element of a vector.
subroutine cqhqr(m, n, r, ldr, c, s)
Reduces an upper Hessenberg matrix to upper trapezoidal form.
subroutine cqrshc(m, n, k, q, ldq, r, ldr, i, j, w, rw)
Updates a QR factorization after a circular shift of columns.
subroutine cqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.