123subroutine zqr1up(m,n,k,Q,ldq,R,ldr,u,v,w,rw)
127 integer,
intent(in) :: m, n, k, ldq, ldr
128 complex(real64),
intent(inout) :: Q(ldq,*), R(ldr,*), u(*), v(*)
129 complex(real64),
intent(out) :: w(*)
130 real(real64),
intent(out) :: rw(*)
131 external zqrqh,zqhqr,zqrot,zqrtv1,zaxpy,zaxcpy, zch1up
132 external dznrm2,dlamch,zdscal,zrot
133 real(real64) dznrm2,dlamch,ru,ruu
137 if (k == 0 .or. n == 0)
return
144 else if (k /= m .and. (k /= n .or. n > m))
then
146 else if (ldq < m)
then
148 else if (ldr < k)
then
158 if (.not.full) ru = dznrm2(m,u,1)
162 if (.not.full)
call zaxpy(m,-w(i),q(1,i),1,u,1)
167 call zqrqh(k,n,r,ldr,rw,w(2))
169 call zqrot(
'B',m,k,q,ldq,rw,w(2))
171 call zaxcpy(n,w(1),v,1,r(1,1),ldr)
173 call zqhqr(k,n,r,ldr,rw,w)
175 call zqrot(
'F',m,min(k,n+1),q,ldq,rw,w)
180 ru = ru * dlamch(
'e')
181 if (ruu <= ru)
return
183 call zdscal(n,ruu,v,1)
184 call zdscal(m,1d0/ruu,u,1)
187 call zrot(m,q(1,i),1,u,1,rw(i),conjg(v(i)))
subroutine zaxcpy(n, a, x, incx, y, incy)
Performs scaled conjugate vector addition.
subroutine zch1up(n, r, ldr, u, w)
Updates a Cholesky factorization after a rank-1 modification.
subroutine qrupdate_xerror(srname, info)
Dispatches error reporting to the handler.
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 zqr1up(m, n, k, q, ldq, r, ldr, u, v, w, rw)
Updates a QR factorization after a rank-1 modification.
subroutine zqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.
Module for custom error handling.