116subroutine dqrshc(m,n,k,Q,ldq,R,ldr,i,j,w)
119 integer,
intent(in) :: m, n, k, ldq, ldr, i, j
120 real(real64),
intent(inout) :: Q(ldq,*)
121 real(real64),
intent(inout) :: R(ldr,*)
122 real(real64),
intent(out) :: w(*)
123 external dqrot,dcopy,dqrtv1,dqrqh,dqhqr
126 if (m == 0 .or. n == 1)
return
133 else if (k /= m .and. (k /= n .or. n > m))
then
135 else if (i < 1 .or. i > n)
then
137 else if (j < 1 .or. j > n)
then
146 call dcopy(k,r(1,i),1,w,1)
148 call dcopy(k,r(1,l+1),1,r(1,l),1)
150 call dcopy(k,w,1,r(1,j),1)
154 call dqhqr(kk+1-i,n+1-i,r(i,i),ldr,w(k+1),w)
156 call dqrot(
'F',m,kk+1-i,q(1,i),ldq,w(k+1),w)
160 call dcopy(k,r(1,i),1,w,1)
162 call dcopy(k,r(1,l-1),1,r(1,l),1)
164 call dcopy(k,w,1,r(1,j),1)
170 call dqrtv1(kk+1-j,r(j,j),w(k+1))
172 call dqrqh(kk+1-j,n-j,r(j,jj),ldr,w(k+1),r(j+1,j))
174 call dqrot(
'B',m,kk+1-j,q(1,j),ldq,w(k+1),r(j+1,j))
subroutine dqrtv1(n, u, w)
Generates Givens rotations to eliminate all but the first element of a vector.
subroutine dqrot(dir, m, n, q, ldq, c, s)
Applies a sequence of Givens rotations from the right to a matrix.
subroutine dqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.
subroutine dqrshc(m, n, k, q, ldq, r, ldr, i, j, w)
Updates a QR factorization after a circular shift of columns.
subroutine dqhqr(m, n, r, ldr, c, s)
Reduces an upper Hessenberg matrix to upper trapezoidal form.