115subroutine zqrinc(m,n,k,Q,ldq,R,ldr,j,x,rw)
119 integer,
intent(in) :: m, n, k, ldq, ldr, j
120 complex(real64),
intent(inout) :: Q(ldq,*), R(ldr,*)
121 complex(real64),
intent(in) :: x(*)
122 real(real64),
intent(out) :: rw(*)
123 external zqrtv1,zqrqh,zqrot,zgqvec
124 external zcopy,zaxpy,zdscal,dznrm2
125 real(real64) dznrm2,rx
136 else if (k /= m .and. (k /= n .or. n >= m))
then
138 else if (ldq < m)
then
140 else if (ldr < min(m,k+1))
then
142 else if (j < 1 .or. j > n+1)
then
152 call zcopy(k,r(1,i),1,r(1,i+1),1)
166 call zcopy(m,x,1,q(1,k1),1)
169 call zaxpy(m,-r(i,j),q(1,i),1,q(1,k1),1)
172 rx = dznrm2(m,q(1,k1),1)
178 call zgqvec(m,k,q,ldq,q(1,k1))
181 call zdscal(m,1d0/rx,q(1,k1),1)
187 call zqrtv1(k1+1-j,r(j,j),rw)
189 if (j <= n)
call zqrqh(k1+1-j,n+1-j,r(j,j+1),ldr,rw,r(j+1,j))
191 call zqrot(
'B',m,k1+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 zqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.
subroutine zqrinc(m, n, k, q, ldq, r, ldr, j, x, rw)
Updates a QR factorization after inserting a new column.
subroutine zgqvec(m, n, q, ldq, u)
Generates a unit vector orthogonal to the column space of a unitary matrix.