116subroutine dqr1up(m,n,k,Q,ldq,R,ldr,u,v,w)
119 integer,
intent(in) :: m, n, k, ldq, ldr
120 real(real64),
intent(inout) :: Q(ldq,*)
121 real(real64),
intent(inout) :: R(ldr,*)
122 real(real64),
intent(inout) :: u(*)
123 real(real64),
intent(inout) :: v(*)
124 real(real64),
intent(out) :: w(*)
125 external dch1up, dqrqh,dqhqr,dqrot,dqrtv1
126 external daxpy,ddot,dnrm2,dlamch,dscal,drot
127 real(real64) ddot,dnrm2,dlamch,ru,ruu
131 if (k == 0 .or. n == 0)
return
138 else if (k /= m .and. (k /= n .or. n > m))
then
140 else if (ldq < m)
then
142 else if (ldr < k)
then
152 if (.not.full) ru = dnrm2(m,u,1)
155 w(i) = ddot(m,q(1,i),1,u,1)
156 if (.not.full)
call daxpy(m,-w(i),q(1,i),1,u,1)
161 call dqrqh(k,n,r,ldr,w(k+1),w(2))
163 call dqrot(
'B',m,k,q,ldq,w(k+1),w(2))
165 call daxpy(n,w(1),v,1,r(1,1),ldr)
167 call dqhqr(k,n,r,ldr,w(k+1),w)
169 call dqrot(
'F',m,min(k,n+1),q,ldq,w(k+1),w)
174 ru = ru * dlamch(
'e')
175 if (ruu <= ru)
return
177 call dscal(n,ruu,v,1)
178 call dscal(m,1d0/ruu,u,1)
179 call dch1up(n,r,ldr,v,w(k+1))
181 call drot(m,q(1,i),1,u,1,w(k+i),v(i))
subroutine dch1up(n, r, ldr, u, w)
Updates a Cholesky factorization after a rank-1 modification.
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 dqr1up(m, n, k, q, ldq, r, ldr, u, v, w)
Updates a QR factorization after a rank-1 modification.
subroutine dqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.
subroutine dqhqr(m, n, r, ldr, c, s)
Reduces an upper Hessenberg matrix to upper trapezoidal form.