|
qrupdate-ng 1.2.0
|
Routines for the computation and efficient updating of the QR factorization of a matrix. More...
Functions | |
| subroutine | cgqvec (m, n, q, ldq, u) |
| Generates a unit vector orthogonal to the column space of a unitary matrix. | |
| subroutine | cqhqr (m, n, r, ldr, c, s) |
| Reduces an upper Hessenberg matrix to upper trapezoidal form. | |
| subroutine | cqr1up (m, n, k, q, ldq, r, ldr, u, v, w, rw) |
| Updates a QR factorization after a rank-1 modification. | |
| subroutine | cqrdec (m, n, k, q, ldq, r, ldr, j, rw) |
| Updates a QR factorization after deleting a column. | |
| subroutine | cqrder (m, n, q, ldq, r, ldr, j, w, rw) |
| Updates a QR factorization after deleting a row. | |
| subroutine | cqrinc (m, n, k, q, ldq, r, ldr, j, x, rw) |
| Updates a QR factorization after inserting a new column. | |
| subroutine | cqrinr (m, n, q, ldq, r, ldr, j, x, rw) |
| Updates a QR factorization after inserting a new row. | |
| subroutine | cqrqh (m, n, r, ldr, c, s) |
| Converts an upper trapezoidal matrix to upper Hessenberg 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 | dgqvec (m, n, q, ldq, u) |
| Generates a unit vector orthogonal to the column space of a unitary matrix. | |
| subroutine | dqhqr (m, n, r, ldr, c, s) |
| Reduces an upper Hessenberg matrix to upper trapezoidal form. | |
| subroutine | dqr1up (m, n, k, q, ldq, r, ldr, u, v, w) |
| Updates a QR factorization after a rank-1 modification. | |
| subroutine | dqrdec (m, n, k, q, ldq, r, ldr, j, w) |
| Updates a QR factorization after deleting a column. | |
| subroutine | dqrder (m, n, q, ldq, r, ldr, j, w) |
| Updates a QR factorization after deleting a row. | |
| subroutine | dqrinc (m, n, k, q, ldq, r, ldr, j, x, w) |
| Updates a QR factorization after inserting a new column. | |
| subroutine | dqrinr (m, n, q, ldq, r, ldr, j, x, w) |
| Updates a QR factorization after inserting a new row. | |
| 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 | sgqvec (m, n, q, ldq, u) |
| Generates a unit vector orthogonal to the column space of a unitary matrix. | |
| subroutine | sqhqr (m, n, r, ldr, c, s) |
| Reduces an upper Hessenberg matrix to upper trapezoidal form. | |
| subroutine | sqr1up (m, n, k, q, ldq, r, ldr, u, v, w) |
| Updates a QR factorization after a rank-1 modification. | |
| subroutine | sqrdec (m, n, k, q, ldq, r, ldr, j, w) |
| Updates a QR factorization after deleting a column. | |
| subroutine | sqrder (m, n, q, ldq, r, ldr, j, w) |
| Updates a QR factorization after deleting a row. | |
| subroutine | sqrinc (m, n, k, q, ldq, r, ldr, j, x, w) |
| Updates a QR factorization after inserting a new column. | |
| subroutine | sqrinr (m, n, q, ldq, r, ldr, j, x, w) |
| Updates a QR factorization after inserting a new row. | |
| subroutine | sqrqh (m, n, r, ldr, c, s) |
| Converts an upper trapezoidal matrix to upper Hessenberg form. | |
| subroutine | sqrshc (m, n, k, q, ldq, r, ldr, i, j, w) |
| Updates a QR factorization after a circular shift of columns. | |
| subroutine | zgqvec (m, n, q, ldq, u) |
| Generates a unit vector orthogonal to the column space of a unitary matrix. | |
| 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 | zqrdec (m, n, k, q, ldq, r, ldr, j, rw) |
| Updates a QR factorization after deleting a column. | |
| subroutine | zqrder (m, n, q, ldq, r, ldr, j, w, rw) |
| Updates a QR factorization after deleting a row. | |
| subroutine | zqrinc (m, n, k, q, ldq, r, ldr, j, x, rw) |
| Updates a QR factorization after inserting a new column. | |
| subroutine | zqrinr (m, n, q, ldq, r, ldr, j, x, rw) |
| Updates a QR factorization after inserting a new row. | |
| subroutine | zqrqh (m, n, r, ldr, c, s) |
| Converts an upper trapezoidal matrix to upper Hessenberg form. | |
| subroutine | zqrshc (m, n, k, q, ldq, r, ldr, i, j, w, rw) |
| Updates a QR factorization after a circular shift of columns. | |
Routines for the computation and efficient updating of the QR factorization of a matrix.
This group provides routines for modifying the original matrix via rank-1 updates, row/column insertions, deletions, or shifts, and updating the corresponding orthogonal matrix Q and upper trapezoidal matrix R without recomputing the entire decomposition from scratch. It supports both full and economized QR factorizations and relies on Givens rotations for maintaining the triangular structure of the R matrix.
| subroutine cgqvec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real32), dimension(ldq,*), intent(in) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(*), intent(out) | u ) |
Generates a unit vector orthogonal to the column space of a unitary matrix.
!> subroutine cgqvec(m,n,Q,ldq,u) !> !> .. Scalar Arguments .. !> integer m, n, ldq !> .. !> .. Array Arguments .. !> complex Q(ldq,*), u(*) !> .. !>
!> !> CGQVEC generates a vector u in the orthogonal complement of the !> column space of a unitary matrix Q. Given an m-by-n unitary !> matrix Q with n < m, CGQVEC generates a vector u of !> length m such that Q'*u = 0 and norm(u) = 1, where Q' denotes !> the conjugate transpose of Q. !> !> The algorithm projects canonical unit vectors onto the orthogonal !> complement of Q's column space until a nonzero result is found. !> If n = 0, the first canonical unit vector is returned. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix Q. n >= 0 and !> n < m. !> |
| [in] | Q | !> Q is COMPLEX array, dimension (ldq,n) !> The unitary m-by-n matrix Q. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of the array Q. ldq >= m. !> |
| [out] | u | !> u is COMPLEX array, dimension (m) !> The generated vector such that Q'*u = 0 and norm(u) = 1. !> |
Definition at line 82 of file cgqvec.f90.
| subroutine cqhqr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real32), dimension(*), intent(out) | c, | ||
| complex(real32), dimension(*), intent(out) | s ) |
Reduces an upper Hessenberg matrix to upper trapezoidal form.
!> subroutine cqhqr(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> complex R(ldr,*), s(*) !> real c(*) !> .. !>
!> !> CQHQR reduces an m-by-n upper Hessenberg matrix R to upper !> trapezoidal form. Given an m-by-n upper Hessenberg matrix R, !> CQHQR applies min(m-1,n) Givens rotations from the !> left to eliminate the subdiagonal elements, producing an upper !> trapezoidal matrix. !> !> On exit, c contains the cosine parts and s contains the sine !> parts of the Givens rotations used in the reduction. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,n) !> On entry, the upper Hessenberg matrix R. On exit, the !> updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of the array R. ldr >= m. !> |
| [out] | c | !> c is REAL array, dimension (min(m-1,n)) !> On exit, the cosine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| [out] | s | !> s is COMPLEX array, dimension (min(m-1,n)) !> On exit, the sine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| subroutine cqr1up | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| complex(real32), dimension(*), intent(inout) | u, | ||
| complex(real32), dimension(*), intent(inout) | v, | ||
| complex(real32), dimension(*), intent(out) | w, | ||
| real(real32), dimension(*), intent(out) | rw ) |
Updates a QR factorization after a rank-1 modification.
!> subroutine cqr1up(m,n,k,Q,ldq,R,ldr,u,v,w,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr !> .. !> .. Array Arguments .. !> complex Q(ldq,*) !> complex R(ldr,*) !> complex u(*) !> complex v(*) !> complex w(*) !> real rw(*) !> .. !>
!> !> CQR1UP updates a QR factorization after rank-1 modification i.e., !> given a m-by-k unitary Q and m-by-n upper trapezoidal R, an m-vector !> u and n-vector v, CQR1UP updates Q -> Q1 and R -> R1 so that !> Q1*R1 = Q*R + u*v', and Q1 is again unitary and R1 upper trapezoidal. !> (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n < m (economical form). !> |
| [in,out] | Q | !> Q is COMPLEX array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,*) !> On entry, the upper trapezoidal m-by-n matrix R. On !> exit, the updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in,out] | u | !> u is COMPLEX array, dimension (*) !> On entry, the left m-vector. On exit, if k < m, !> u is destroyed. !> |
| [in,out] | v | !> v is COMPLEX array, dimension (*) !> On entry, the right n-vector. On exit, v is !> destroyed. !> |
| [out] | w | !> w is COMPLEX array, dimension (*) !> A workspace vector of size k. !> |
| [out] | rw | !> rw is REAL array, dimension (*) !> A real workspace vector of size k. !> |
Definition at line 123 of file cqr1up.f90.
| subroutine cqrdec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real32), dimension(*), intent(out) | rw ) |
Updates a QR factorization after deleting a column.
!> subroutine cqrdec(m,n,k,Q,ldq,R,ldr,j,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> complex Q(ldq,*) !> complex R(ldr,*) !> real rw(*) !> .. !>
!> !> CQRDEC updates a QR factorization after deleting a column. i.e., !> given an m-by-k unitary matrix Q, an k-by-n upper trapezoidal matrix !> R and index j in the range 1:n+1, CQRDEC updates the matrix !> Q -> Q1 and R -> R1 so that Q1 remains unitary, R1 is upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1) A(:,j+1:n)], where A = Q*R. !> (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> (full Q) or k = n < m (economical form, basis dimension will !> decrease). !> |
| [in,out] | Q | !> Q is COMPLEX array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted column in R. 1 <= j <= n. !> |
| [out] | rw | !> rw is REAL array, dimension (*) !> A real workspace vector of size k-j. !> |
Definition at line 108 of file cqrdec.f90.
| subroutine cqrder | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| complex(real32), dimension(*), intent(out) | w, | ||
| real(real32), dimension(*), intent(out) | rw ) |
Updates a QR factorization after deleting a row.
!> subroutine cqrder(m,n,Q,ldq,R,ldr,j,w,rw) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> complex Q(ldq,*) !> complex R(ldr,*) !> complex w(*) !> real rw(*) !> .. !>
!> !> CQRDER updates a QR factorization after deleting a row. i.e., given !> an m-by-m unitary matrix Q, an m-by-n upper trapezoidal matrix R and !> index j in the range 1:m, CQRDER updates Q ->Q1 and an R -> !> R1 so that Q1 is again unitary, R1 upper trapezoidal, and Q1*R1 = !> [A(1:j-1,:); A(j+1:m,:)], where A = Q*R. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is COMPLEX array, dimension (ldq,*) !> On entry, the unitary matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted row. 1 <= j <= m. !> |
| [out] | w | !> w is COMPLEX array, dimension (*) !> A workspace vector of size m. !> |
| [out] | rw | !> rw is REAL array, dimension (*) !> A real workspace vector of size m. !> |
Definition at line 106 of file cqrder.f90.
| subroutine cqrinc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| complex(real32), dimension(*), intent(in) | x, | ||
| real(real32), dimension(*), intent(out) | rw ) |
Updates a QR factorization after inserting a new column.
!> subroutine cqrinc(m,n,k,Q,ldq,R,ldr,j,x,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> complex Q(ldq,*) !> complex R(ldr,*) !> complex x(*) !> real rw(*) !> .. !>
!> !> CQRINC updates a QR factorization after inserting a new column. i.e., !> given an m-by-k unitary matrix Q, an m-by-n upper trapezoidal matrix !> R and index j in the range 1:n+1, CQRINC updates the matrix !> Q -> Q1 and R -> R1 so that Q1 is again unitary, R1 upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1); x; A(:,j:n)], where A = Q*R. !> (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n <= m (economical form, !> basis dimension will increase). !> |
| [in,out] | Q | !> Q is COMPLEX array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= min(m,n+1). !> |
| [in] | j | !> j is INTEGER !> The position of the new column in R1. 1 <= j <= n+1. !> |
| [in] | x | !> x is COMPLEX array, dimension (*) !> The column being inserted. !> |
| [out] | rw | !> rw is REAL array, dimension (*) !> A real workspace vector of size k. !> |
Definition at line 115 of file cqrinc.f90.
| subroutine cqrinr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| complex(real32), dimension(*), intent(inout) | x, | ||
| real(real32), dimension(*), intent(out) | rw ) |
Updates a QR factorization after inserting a new row.
!> subroutine cqrinr(m,n,Q,ldq,R,ldr,j,x,rw) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> complex Q(ldq,*) !> complex R(ldr,*) !> complex x(*) !> real rw(*) !> .. !>
!> !> CQRINR updates a QR factorization after inserting a new row. i.e., !> given an m-by-m unitary matrix Q, an m-by-n upper trapezoidal matrix !> R and index j in the range 1:m+1, CQRINR updates Q -> Q1 and !> R -> R1 so that Q1 is again unitary, R1 upper trapezoidal, and Q1*R1 !> = [A(1:j-1,:); x; A(j:m,:)], where A = Q*R. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is COMPLEX array, dimension (ldq,*) !> On entry, the unitary matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m+1. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m+1. !> |
| [in] | j | !> j is INTEGER !> The position of the new row in R1. 1 <= j <= m+1. !> |
| [in,out] | x | !> x is COMPLEX array, dimension (*) !> On entry, the row being added. On exit, x is !> destroyed. !> |
| [out] | rw | !> rw is REAL array, dimension (*) !> A real workspace vector of size min(m,n). !> |
Definition at line 107 of file cqrinr.f90.
| subroutine cqrqh | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real32), dimension(*), intent(in) | c, | ||
| complex(real32), dimension(*), intent(in) | s ) |
Converts an upper trapezoidal matrix to upper Hessenberg form.
!> subroutine cqrqh(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> complex R(ldr,*), s(*) !> real c(*) !> .. !>
!> !> CQRQH brings an m-by-n upper trapezoidal matrix R into upper !> Hessenberg form. Given an m-by-n upper trapezoidal matrix R, !> CQRQH applies min(m-1,n) inverse Givens rotations !> from the right to introduce subdiagonal elements, producing an !> upper Hessenberg matrix. !> !> On exit, c contains the cosine parts and s contains the sine !> parts of the Givens rotations used in the transformation. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,n) !> On entry, the upper trapezoidal matrix R. On exit, the !> upper Hessenberg matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of the array R. ldr >= m. !> |
| [in] | c | !> c is REAL array, dimension (min(m-1,n)) !> The cosine parts of the Givens rotations. !> |
| [in] | s | !> s is COMPLEX array, dimension (min(m-1,n)) !> The sine parts of the Givens rotations. !> |
| subroutine cqrshc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| complex(real32), dimension(*), intent(out) | w, | ||
| real(real32), dimension(*), intent(out) | rw ) |
Updates a QR factorization after a circular shift of columns.
!> subroutine cqrshc(m,n,k,Q,ldq,R,ldr,i,j,w,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, i, j !> .. !> .. Array Arguments .. !> complex Q(ldq,*) !> complex R(ldr,*) !> complex w(*) !> real rw(*) !> .. !>
!> !> CQRSHC updates a QR factorization after circular shift of columns. !> i.e., given an m-by-k unitary matrix Q, an k-by-n upper trapezoidal !> matrix R and index j in the range 1:n+1, CQRSHC updates the !> matrix Q -> Q1 and R -> R1 so that Q1 is again unitary, R1 upper !> trapezoidal, and Q1*R1 = A(:,p), where A = Q*R and p is the !> permutation [1:i-1,shift(i:j,-1),j+1:n] if i < j or !> [1:j-1,shift(j:i,+1),i+1:n] if j < i. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q1, and rows of R1. Must be !> either k = m (full Q) or k = n <= m (economical form). !> |
| [in,out] | Q | !> Q is COMPLEX array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | i | !> i is INTEGER !> The first index determining the range (see above). !> |
| [in] | j | !> j is INTEGER !> The second index determining the range (see above). !> |
| [out] | w | !> w is COMPLEX array, dimension (*) !> A workspace vector of size k. !> |
| [out] | rw | !> rw is REAL array, dimension (*) !> A real workspace vector of size k. !> |
Definition at line 121 of file cqrshc.f90.
| subroutine dgqvec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real64), dimension(ldq,*), intent(in) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(*), intent(out) | u ) |
Generates a unit vector orthogonal to the column space of a unitary matrix.
!> subroutine dgqvec(m,n,Q,ldq,u) !> !> .. Scalar Arguments .. !> integer m, n, ldq !> .. !> .. Array Arguments .. !> double precision Q(ldq,*), u(*) !> .. !>
!> !> DGQVEC generates a vector u in the orthogonal complement of the !> column space of an orthogonal matrix Q. Given an m-by-n !> orthogonal matrix Q with n < m, DGQVEC generates a !> vector u of length m such that Q.'*u = 0 and norm(u) = 1, where !> Q.' denotes the transpose of Q. !> !> The algorithm projects canonical unit vectors onto the orthogonal !> complement of Q's column space until a nonzero result is found. !> If n = 0, the first canonical unit vector is returned. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix Q. n >= 0 and !> n < m. !> |
| [in] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,n) !> The orthogonal m-by-n matrix Q. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of the array Q. ldq >= m. !> |
| [out] | u | !> u is DOUBLE PRECISION array, dimension (m) !> The generated vector such that Q.'*u = 0 and norm(u) = 1. !> |
Definition at line 82 of file dgqvec.f90.
| subroutine dqhqr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real64), dimension(*), intent(out) | c, | ||
| real(real64), dimension(*), intent(out) | s ) |
Reduces an upper Hessenberg matrix to upper trapezoidal form.
!> subroutine dqhqr(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> double precision R(ldr,*), c(*), s(*) !> .. !>
!> !> DQHQR reduces an m-by-n upper Hessenberg matrix R to upper !> trapezoidal form. Given an m-by-n upper Hessenberg matrix R, !> DQHQR applies min(m-1,n) Givens rotations from the !> left to eliminate the subdiagonal elements, producing an upper !> trapezoidal matrix. !> !> On exit, c contains the cosine parts and s contains the sine !> parts of the Givens rotations used in the reduction. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,n) !> On entry, the upper Hessenberg matrix R. On exit, the !> updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of the array R. ldr >= m. !> |
| [out] | c | !> c is DOUBLE PRECISION array, dimension (min(m-1,n)) !> On exit, the cosine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| [out] | s | !> s is DOUBLE PRECISION array, dimension (min(m-1,n)) !> On exit, the sine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| subroutine dqr1up | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real64), dimension(*), intent(inout) | u, | ||
| real(real64), dimension(*), intent(inout) | v, | ||
| real(real64), dimension(*), intent(out) | w ) |
Updates a QR factorization after a rank-1 modification.
!> subroutine dqr1up(m,n,k,Q,ldq,R,ldr,u,v,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr !> .. !> .. Array Arguments .. !> double precision Q(ldq,*) !> double precision R(ldr,*) !> double precision u(*) !> double precision v(*) !> double precision w(*) !> .. !>
!> !> DQR1UP updates a QR factorization after rank-1 modification i.e., !> given a m-by-k orthogonal Q and m-by-n upper trapezoidal R, an !> m-vector u and n-vector v, DQR1UP updates Q -> Q1 and R -> !> R1 so that Q1*R1 = Q*R + u*v', and Q1 is again orthonormal and R1 !> upper trapezoidal. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n < m (economical form). !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the upper trapezoidal m-by-n matrix R. On !> exit, the updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in,out] | u | !> u is DOUBLE PRECISION array, dimension (*) !> On entry, the left m-vector. On exit, if k < m, !> u is destroyed. !> |
| [in,out] | v | !> v is DOUBLE PRECISION array, dimension (*) !> On entry, the right n-vector. On exit, v is !> destroyed. !> |
| [out] | w | !> w is DOUBLE PRECISION array, dimension (*) !> A workspace vector of size 2*k. !> |
Definition at line 116 of file dqr1up.f90.
| subroutine dqrdec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real64), dimension(*), intent(out) | w ) |
Updates a QR factorization after deleting a column.
!> subroutine dqrdec(m,n,k,Q,ldq,R,ldr,j,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> double precision Q(ldq,*) !> double precision R(ldr,*) !> double precision w(*) !> .. !>
!> !> DQRDEC updates a QR factorization after deleting a column. i.e., !> given an m-by-k orthogonal matrix Q, an k-by-n upper trapezoidal !> matrix R and index j in the range 1:n+1, DQRDEC updates the !> matrix Q -> Q1 and R -> R1 so that Q1 remains orthogonal, R1 is upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1) A(:,j+1:n)], where A = Q*R. !> (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n < m (economical form, !> basis dimension will decrease). !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted column in R. 1 <= j <= n. !> |
| [out] | w | !> w is DOUBLE PRECISION array, dimension (*) !> A workspace vector of size k-j. !> |
Definition at line 108 of file dqrdec.f90.
| subroutine dqrder | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real64), dimension(*), intent(out) | w ) |
Updates a QR factorization after deleting a row.
!> subroutine dqrder(m,n,Q,ldq,R,ldr,j,w) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> double precision Q(ldq,*) !> double precision R(ldr,*) !> double precision w(*) !> .. !>
!> !> DQRDER updates a QR factorization after deleting a row. i.e., given !> an m-by-m orthogonal matrix Q, an m-by-n upper trapezoidal matrix R !> and index j in the range 1:m, DQRDER updates Q ->Q1 and an R !> -> R1 so that Q1 is again orthogonal, R1 upper trapezoidal, and Q1*R1 !> = [A(1:j-1,:); A(j+1:m,:)], where A = Q*R. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 1. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,*) !> On entry, the orthogonal matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted row. 1 <= j <= m. !> |
| [out] | w | !> w is DOUBLE PRECISION array, dimension (*) !> A workspace vector of size 2*m. !> |
Definition at line 99 of file dqrder.f90.
| subroutine dqrinc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real64), dimension(*), intent(in) | x, | ||
| real(real64), dimension(*), intent(out) | w ) |
Updates a QR factorization after inserting a new column.
!> subroutine dqrinc(m,n,k,Q,ldq,R,ldr,j,x,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> double precision Q(ldq,*) !> double precision R(ldr,*) !> double precision x(*) !> double precision w(*) !> .. !>
!> !> DQRINC updates a QR factorization after inserting a new column. i.e., !> given an m-by-k orthogonal matrix Q, an m-by-n upper trapezoidal !> matrix R and index j in the range 1:n+1, DQRINC updates the !> matrix Q -> Q1 and R -> R1 so that Q1 is again orthogonal, R1 upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1); x; A(:,j:n)], where A = Q*R. !> (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n <= m (economical form, !> basis dimension will increase). !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= min(m,n+1). !> |
| [in] | j | !> j is INTEGER !> The position of the new column in R1. 1 <= j <= n+1. !> |
| [in] | x | !> x is DOUBLE PRECISION array, dimension (*) !> The column being inserted. !> |
| [out] | w | !> w is DOUBLE PRECISION array, dimension (*) !> A workspace vector of size k. !> |
Definition at line 115 of file dqrinc.f90.
| subroutine dqrinr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real64), dimension(*), intent(inout) | x, | ||
| real(real64), dimension(*), intent(out) | w ) |
Updates a QR factorization after inserting a new row.
!> subroutine dqrinr(m,n,Q,ldq,R,ldr,j,x,w) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> double precision Q(ldq,*) !> double precision R(ldr,*) !> double precision x(*) !> double precision w(*) !> .. !>
!> !> DQRINR updates a QR factorization after inserting a new row. i.e., !> given an m-by-m orthogonal matrix Q, an m-by-n upper trapezoidal !> matrix R and index j in the range 1:m+1, DQRINR updates Q -> !> Q1 and R -> R1 so that Q1 is again orthogonal, R1 upper trapezoidal, !> and Q1*R1 = [A(1:j-1,:); x; A(j:m,:)], where A = Q*R. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,*) !> On entry, the orthogonal matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m+1. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m+1. !> |
| [in] | j | !> j is INTEGER !> The position of the new row in R1. 1 <= j <= m+1. !> |
| [in,out] | x | !> x is DOUBLE PRECISION array, dimension (*) !> On entry, the row being added. On exit, x is !> destroyed. !> |
| [out] | w | !> w is DOUBLE PRECISION array, dimension (*) !> A workspace vector of size min(m,n). !> |
Definition at line 107 of file dqrinr.f90.
| subroutine dqrqh | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real64), dimension(*), intent(in) | c, | ||
| real(real64), dimension(*), intent(in) | s ) |
Converts an upper trapezoidal matrix to upper Hessenberg form.
!> subroutine dqrqh(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> double precision R(ldr,*) !> double precision c(*) !> double precision s(*) !> .. !>
!> !> DQRQH brings an upper trapezoidal matrix R into upper Hessenberg form !> using min(m-1,n) Givens rotations. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the upper Hessenberg matrix R. On exit, !> the updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | c | !> c is DOUBLE PRECISION array, dimension (*) !> The rotation cosines. Must contain at least !> min(m-1,n) elements. !> |
| [in] | s | !> s is DOUBLE PRECISION array, dimension (*) !> The rotation sines. Must contain at least !> min(m-1,n) elements. !> |
| subroutine dqrshc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| real(real64), dimension(*), intent(out) | w ) |
Updates a QR factorization after a circular shift of columns.
!> subroutine dqrshc(m,n,k,Q,ldq,R,ldr,i,j,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, i, j !> .. !> .. Array Arguments .. !> double precision Q(ldq,*) !> double precision R(ldr,*) !> double precision w(*) !> .. !>
!> !> DQRSHC updates a QR factorization after circular shift of columns. !> i.e., given an m-by-k orthogonal matrix Q, an k-by-n upper !> trapezoidal matrix R and index j in the range 1:n+1, DQRSHC !> updates the matrix Q -> Q1 and R -> R1 so that Q1 is again !> orthogonal, R1 upper trapezoidal, and Q1*R1 = A(:,p), where A = Q*R !> and p is the permutation [1:i-1,shift(i:j,-1),j+1:n] if i < j or !> [1:j-1,shift(j:i,+1),i+1:n] if j < i. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q1, and rows of R1. Must be !> either k = m (full Q) or k = n <= m (economical form). !> |
| [in,out] | Q | !> Q is DOUBLE PRECISION array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is DOUBLE PRECISION array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | i | !> i is INTEGER !> The first index determining the range (see above). !> 1 <= i <= n. !> |
| [in] | j | !> j is INTEGER !> The second index determining the range (see above). !> 1 <= j <= n. !> |
| [out] | w | !> w is DOUBLE PRECISION array, dimension (*) !> A workspace vector of size 2*k. !> |
Definition at line 116 of file dqrshc.f90.
| subroutine sgqvec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real32), dimension(ldq,*), intent(in) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(*), intent(out) | u ) |
Generates a unit vector orthogonal to the column space of a unitary matrix.
!> subroutine sgqvec(m,n,Q,ldq,u) !> !> .. Scalar Arguments .. !> integer m, n, ldq !> .. !> .. Array Arguments .. !> real Q(ldq,*), u(*) !> .. !>
!> !> SGQVEC generates a vector u in the orthogonal complement of the !> column space of an orthogonal matrix Q. Given an m-by-n !> orthogonal matrix Q with n < m, SGQVEC generates a !> vector u of length m such that Q.'*u = 0 and norm(u) = 1, where !> Q.' denotes the transpose of Q. !> !> The algorithm projects canonical unit vectors onto the orthogonal !> complement of Q's column space until a nonzero result is found. !> If n = 0, the first canonical unit vector is returned. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix Q. n >= 0 and !> n < m. !> |
| [in] | Q | !> Q is REAL array, dimension (ldq,n) !> The orthogonal m-by-n matrix Q. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of the array Q. ldq >= m. !> |
| [out] | u | !> u is REAL array, dimension (m) !> The generated vector such that Q.'*u = 0 and norm(u) = 1. !> |
Definition at line 82 of file sgqvec.f90.
| subroutine sqhqr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real32), dimension(*), intent(in) | c, | ||
| real(real32), dimension(*), intent(in) | s ) |
Reduces an upper Hessenberg matrix to upper trapezoidal form.
!> subroutine sqhqr(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> real R(ldr,*), c(*), s(*) !> .. !>
!> !> SQHQR reduces an m-by-n upper Hessenberg matrix R to upper !> trapezoidal form. Given an m-by-n upper Hessenberg matrix R, !> SQHQR applies min(m-1,n) Givens rotations from the !> left to eliminate the subdiagonal elements, producing an upper !> trapezoidal matrix. !> !> On exit, c contains the cosine parts and s contains the sine !> parts of the Givens rotations used in the reduction. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,n) !> On entry, the upper Hessenberg matrix R. On exit, the !> updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of the array R. ldr >= m. !> |
| [out] | c | !> c is REAL array, dimension (min(m-1,n)) !> On exit, the cosine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| [out] | s | !> s is REAL array, dimension (min(m-1,n)) !> On exit, the sine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| subroutine sqr1up | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real32), dimension(*), intent(inout) | u, | ||
| real(real32), dimension(*), intent(inout) | v, | ||
| real(real32), dimension(*), intent(out) | w ) |
Updates a QR factorization after a rank-1 modification.
!> subroutine sqr1up(m,n,k,Q,ldq,R,ldr,u,v,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr !> .. !> .. Array Arguments .. !> real Q(ldq,*) !> real R(ldr,*) !> real u(*) !> real v(*) !> real w(*) !> .. !>
!> !> SQR1UP updates a QR factorization after rank-1 modification i.e., !> given a m-by-k orthogonal Q and m-by-n upper trapezoidal R, an !> m-vector u and n-vector v, SQR1UP updates Q -> Q1 and R -> !> R1 so that Q1*R1 = Q*R + u*v', and Q1 is again orthonormal and R1 !> upper trapezoidal. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n < m (economical form). !> |
| [in,out] | Q | !> Q is REAL array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the upper trapezoidal m-by-n matrix R. On !> exit, the updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in,out] | u | !> u is REAL array, dimension (*) !> On entry, the left m-vector. On exit, if k < m, !> u is destroyed. !> |
| [in,out] | v | !> v is REAL array, dimension (*) !> On entry, the right n-vector. On exit, v is !> destroyed. !> |
| [out] | w | !> w is REAL array, dimension (*) !> A workspace vector of size 2*k. !> |
Definition at line 116 of file sqr1up.f90.
| subroutine sqrdec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real32), dimension(*), intent(out) | w ) |
Updates a QR factorization after deleting a column.
!> subroutine sqrdec(m,n,k,Q,ldq,R,ldr,j,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> real Q(ldq,*) !> real R(ldr,*) !> real w(*) !> .. !>
!> !> SQRDEC updates a QR factorization after deleting a column. i.e., !> given an m-by-k orthogonal matrix Q, an k-by-n upper trapezoidal !> matrix R and index j in the range 1:n+1, SQRDEC updates the !> matrix Q -> Q1 and R -> R1 so that Q1 remains orthogonal, R1 is upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1) A(:,j+1:n)], where A = Q*R. !> (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n < m (economical form, !> basis dimension will decrease). !> |
| [in,out] | Q | !> Q is REAL array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted column in R. 1 <= j <= n. !> |
| [out] | w | !> w is REAL array, dimension (*) !> A workspace vector of size k-j. !> |
Definition at line 108 of file sqrdec.f90.
| subroutine sqrder | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real32), dimension(*), intent(out) | w ) |
Updates a QR factorization after deleting a row.
!> subroutine sqrder(m,n,Q,ldq,R,ldr,j,w) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> real Q(ldq,*) !> real R(ldr,*) !> real w(*) !> .. !>
!> !> SQRDER updates a QR factorization after deleting a row. i.e., given !> an m-by-m orthogonal matrix Q, an m-by-n upper trapezoidal matrix R !> and index j in the range 1:m, SQRDER updates Q ->Q1 and an R !> -> R1 so that Q1 is again orthogonal, R1 upper trapezoidal, and Q1*R1 !> = [A(1:j-1,:); A(j+1:m,:)], where A = Q*R. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 1. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is REAL array, dimension (ldq,*) !> On entry, the orthogonal matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted row. 1 <= j <= m. !> |
| [out] | w | !> w is REAL array, dimension (*) !> A workspace vector of size 2*m. !> |
Definition at line 99 of file sqrder.f90.
| subroutine sqrinc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real32), dimension(*), intent(in) | x, | ||
| real(real32), dimension(*), intent(out) | w ) |
Updates a QR factorization after inserting a new column.
!> subroutine sqrinc(m,n,k,Q,ldq,R,ldr,j,x,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> real Q(ldq,*) !> real R(ldr,*) !> real x(*) !> real w(*) !> .. !>
!> !> SQRINC updates a QR factorization after inserting a new column. i.e., !> given an m-by-k orthogonal matrix Q, an m-by-n upper trapezoidal !> matrix R and index j in the range 1:n+1, SQRINC updates the !> matrix Q -> Q1 and R -> R1 so that Q1 is again orthogonal, R1 upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1); x; A(:,j:n)], where A = Q*R. !> (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n <= m (economical form, !> basis dimension will increase). !> |
| [in,out] | Q | !> Q is REAL array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= min(m,n+1). !> |
| [in] | j | !> j is INTEGER !> The position of the new column in R1. 1 <= j <= n+1. !> |
| [in] | x | !> x is REAL array, dimension (*) !> The column being inserted. !> |
| [out] | w | !> w is REAL array, dimension (*) !> A workspace vector of size k. !> |
Definition at line 115 of file sqrinc.f90.
| subroutine sqrinr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real32), dimension(*), intent(inout) | x, | ||
| real(real32), dimension(*), intent(out) | w ) |
Updates a QR factorization after inserting a new row.
!> subroutine sqrinr(m,n,Q,ldq,R,ldr,j,x,w) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> real Q(ldq,*) !> real R(ldr,*) !> real x(*) !> real w(*) !> .. !>
!> !> SQRINR updates a QR factorization after inserting a new row. i.e., !> given an m-by-m orthogonal matrix Q, an m-by-n upper trapezoidal !> matrix R and index j in the range 1:m+1, SQRINR updates Q -> !> Q1 and R -> R1 so that Q1 is again orthogonal, R1 upper trapezoidal, !> and Q1*R1 = [A(1:j-1,:); x; A(j:m,:)], where A = Q*R. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is REAL array, dimension (ldq,*) !> On entry, the orthogonal matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m+1. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m+1. !> |
| [in] | j | !> j is INTEGER !> The position of the new row in R1. 1 <= j <= m+1. !> |
| [in,out] | x | !> x is REAL array, dimension (*) !> On entry, the row being added. On exit, x is !> |
| [out] | w | !> w is REAL array, dimension (*) !> A workspace vector of size min(m,n). !> |
Definition at line 106 of file sqrinr.f90.
| subroutine sqrqh | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real32), dimension(*), intent(in) | c, | ||
| real(real32), dimension(*), intent(in) | s ) |
Converts an upper trapezoidal matrix to upper Hessenberg form.
!> subroutine sqrqh(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> real R(ldr,*) !> real c(*) !> real s(*) !> .. !>
!> !> SQRQH brings an upper trapezoidal matrix R into upper Hessenberg form !> using min(m-1,n) Givens rotations. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the upper Hessenberg matrix R. On exit, !> the updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | c | !> c is REAL array, dimension (*) !> The rotation cosines. Must contain at least !> min(m-1,n) elements. !> |
| [in] | s | !> s is REAL array, dimension (*) !> The rotation sines. Must contain at least !> min(m-1,n) elements. !> |
| subroutine sqrshc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| real(real32), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| real(real32), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| real(real32), dimension(*), intent(out) | w ) |
Updates a QR factorization after a circular shift of columns.
!> subroutine sqrshc(m,n,k,Q,ldq,R,ldr,i,j,w) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, i, j !> .. !> .. Array Arguments .. !> real Q(ldq,*) !> real R(ldr,*) !> real w(*) !> .. !>
!> !> SQRSHC updates a QR factorization after circular shift of columns. !> i.e., given an m-by-k orthogonal matrix Q, an k-by-n upper !> trapezoidal matrix R and index j in the range 1:n+1, SQRSHC !> updates the matrix Q -> Q1 and R -> R1 so that Q1 is again !> orthogonal, R1 upper trapezoidal, and Q1*R1 = A(:,p), where A = Q*R !> and p is the permutation [1:i-1,shift(i:j,-1),j+1:n] if i < j or !> [1:j-1,shift(j:i,+1),i+1:n] if j < i. (real version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q1, and rows of R1. Must be !> either k = m (full Q) or k = n <= m (economical form). !> |
| [in,out] | Q | !> Q is REAL array, dimension (ldq,*) !> On entry, the orthogonal m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is REAL array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | i | !> i is INTEGER !> The first index determining the range (see above). !> |
| [in] | j | !> j is INTEGER !> The second index determining the range (see above). !> |
| [out] | w | !> w is REAL array, dimension (*) !> A workspace vector of size 2*k. !> |
Definition at line 114 of file sqrshc.f90.
| subroutine zgqvec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real64), dimension(ldq,*), intent(in) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(*), intent(out) | u ) |
Generates a unit vector orthogonal to the column space of a unitary matrix.
!> subroutine zgqvec(m,n,Q,ldq,u) !> !> .. Scalar Arguments .. !> integer m, n, ldq !> .. !> .. Array Arguments .. !> double complex Q(ldq,*), u(*) !> .. !>
!> !> ZGQVEC generates a vector u in the orthogonal complement of the !> column space of a unitary matrix Q. Given an m-by-n unitary !> matrix Q with n < m, ZGQVEC generates a vector u of !> length m such that Q'*u = 0 and norm(u) = 1, where Q' denotes !> the conjugate transpose of Q. !> !> The algorithm projects canonical unit vectors onto the orthogonal !> complement of Q's column space until a nonzero result is found. !> If n = 0, the first canonical unit vector is returned. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix Q. n >= 0 and !> n < m. !> |
| [in] | Q | !> Q is COMPLEX*16 array, dimension (ldq,n) !> The unitary m-by-n matrix Q. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of the array Q. ldq >= m. !> |
| [out] | u | !> u is COMPLEX*16 array, dimension (m) !> The generated vector such that Q'*u = 0 and norm(u) = 1. !> |
Definition at line 82 of file zgqvec.f90.
| subroutine zqhqr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real64), dimension(*), intent(out) | c, | ||
| complex(real64), dimension(*), intent(out) | s ) |
Reduces an upper Hessenberg matrix to upper trapezoidal form.
!> subroutine zqhqr(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> double complex R(ldr,*), s(*) !> double precision c(*) !> .. !>
!> !> ZQHQR reduces an m-by-n upper Hessenberg matrix R to upper !> trapezoidal form. Given an m-by-n upper Hessenberg matrix R, !> ZQHQR applies min(m-1,n) Givens rotations from the !> left to eliminate the subdiagonal elements, producing an upper !> trapezoidal matrix. !> !> On exit, c contains the cosine parts and s contains the sine !> parts of the Givens rotations used in the reduction. !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,n) !> On entry, the upper Hessenberg matrix R. On exit, the !> updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of the array R. ldr >= m. !> |
| [out] | c | !> c is DOUBLE PRECISION array, dimension (min(m-1,n)) !> On exit, the cosine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| [out] | s | !> s is COMPLEX*16 array, dimension (min(m-1,n)) !> On exit, the sine parts of the Givens rotations used !> to reduce R to upper trapezoidal form. !> |
| subroutine zqr1up | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| complex(real64), dimension(*), intent(inout) | u, | ||
| complex(real64), dimension(*), intent(inout) | v, | ||
| complex(real64), dimension(*), intent(out) | w, | ||
| real(real64), dimension(*), intent(out) | rw ) |
Updates a QR factorization after a rank-1 modification.
!> subroutine zqr1up(m,n,k,Q,ldq,R,ldr,u,v,w,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr !> .. !> .. Array Arguments .. !> double complex Q(ldq,*) !> double complex R(ldr,*) !> double complex u(*) !> double complex v(*) !> double complex w(*) !> double precision rw(*) !> .. !>
!> !> ZQR1UP updates a QR factorization after rank-1 modification i.e., !> given a m-by-k unitary Q and m-by-n upper trapezoidal R, an m-vector !> u and n-vector v, ZQR1UP updates Q -> Q1 and R -> R1 so that !> Q1*R1 = Q*R + u*v', and Q1 is again unitary and R1 upper trapezoidal. !> (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n < m (economical form). !> |
| [in,out] | Q | !> Q is COMPLEX*16 array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the upper trapezoidal m-by-n matrix R. On !> exit, the updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in,out] | u | !> u is COMPLEX*16 array, dimension (*) !> On entry, the left m-vector. On exit, if k < m, !> u is destroyed. !> |
| [in,out] | v | !> v is COMPLEX*16 array, dimension (*) !> On entry, the right n-vector. On exit, v is !> destroyed. !> |
| [out] | w | !> w is COMPLEX*16 array, dimension (*) !> A workspace vector of size k. !> |
| [out] | rw | !> rw is DOUBLE PRECISION array, dimension (*) !> A real workspace vector of size k. !> |
Definition at line 123 of file zqr1up.f90.
| subroutine zqrdec | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| real(real64), dimension(*), intent(out) | rw ) |
Updates a QR factorization after deleting a column.
!> subroutine zqrdec(m,n,k,Q,ldq,R,ldr,j,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> double complex Q(ldq,*) !> double complex R(ldr,*) !> double precision rw(*) !> .. !>
!> !> ZQRDEC updates a QR factorization after deleting a column. i.e., !> given an m-by-k unitary matrix Q, an k-by-n upper trapezoidal matrix !> R and index j in the range 1:n+1, ZQRDEC updates the matrix !> Q -> Q1 and R -> R1 so that Q1 remains unitary, R1 is upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1) A(:,j+1:n)], where A = Q*R. !> (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> (full Q) or k = n < m (economical form, basis dimension will !> decrease). !> |
| [in,out] | Q | !> Q is COMPLEX*16 array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted column in R. 1 <= j <= n. !> |
| [out] | rw | !> rw is DOUBLE PRECISION array, dimension (*) !> A real workspace vector of size k-j. !> |
Definition at line 108 of file zqrdec.f90.
| subroutine zqrder | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| complex(real64), dimension(*), intent(out) | w, | ||
| real(real64), dimension(*), intent(out) | rw ) |
Updates a QR factorization after deleting a row.
!> subroutine zqrder(m,n,Q,ldq,R,ldr,j,w,rw) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> double complex Q(ldq,*) !> double complex R(ldr,*) !> double complex w(*) !> double precision rw(*) !> .. !>
!> !> ZQRDER updates a QR factorization after deleting a row. i.e., given !> an m-by-m unitary matrix Q, an m-by-n upper trapezoidal matrix R and !> index j in the range 1:m, ZQRDER updates Q ->Q1 and an R -> !> R1 so that Q1 is again unitary, R1 upper trapezoidal, and Q1*R1 = !> [A(1:j-1,:); A(j+1:m,:)], where A = Q*R. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is COMPLEX*16 array, dimension (ldq,*) !> On entry, the unitary matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | j | !> j is INTEGER !> The position of the deleted row. 1 <= j <= m. !> |
| [out] | w | !> w is COMPLEX*16 array, dimension (*) !> A workspace vector of size m. !> |
| [out] | rw | !> rw is DOUBLE PRECISION array, dimension (*) !> A real workspace vector of size m. !> |
Definition at line 106 of file zqrder.f90.
| subroutine zqrinc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| complex(real64), dimension(*), intent(in) | x, | ||
| real(real64), dimension(*), intent(out) | rw ) |
Updates a QR factorization after inserting a new column.
!> subroutine zqrinc(m,n,k,Q,ldq,R,ldr,j,x,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, j !> .. !> .. Array Arguments .. !> double complex Q(ldq,*) !> double complex R(ldr,*) !> double complex x(*) !> double precision rw(*) !> .. !>
!> !> ZQRINC updates a QR factorization after inserting a new column. i.e., !> given an m-by-k unitary matrix Q, an m-by-n upper trapezoidal matrix !> R and index j in the range 1:n+1, ZQRINC updates the matrix !> Q -> Q1 and R -> R1 so that Q1 is again unitary, R1 upper !> trapezoidal, and Q1*R1 = [A(:,1:j-1); x; A(:,j:n)], where A = Q*R. !> (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q, and rows of R. Must be !> either k = m (full Q) or k = n <= m (economical form, !> basis dimension will increase). !> |
| [in,out] | Q | !> Q is COMPLEX*16 array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= min(m,n+1). !> |
| [in] | j | !> j is INTEGER !> The position of the new column in R1. 1 <= j <= n+1. !> |
| [in] | x | !> x is COMPLEX*16 array, dimension (*) !> The column being inserted. !> |
| [out] | rw | !> rw is DOUBLE PRECISION array, dimension (*) !> A real workspace vector of size k. !> |
Definition at line 115 of file zqrinc.f90.
| subroutine zqrinr | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | j, | ||
| complex(real64), dimension(*), intent(inout) | x, | ||
| real(real64), dimension(*), intent(out) | rw ) |
Updates a QR factorization after inserting a new row.
!> subroutine zqrinr(m,n,Q,ldq,R,ldr,j,x,rw) !> !> .. Scalar Arguments .. !> integer m, n, ldq, ldr, j !> .. !> .. Array Arguments .. !> double complex Q(ldq,*) !> double complex R(ldr,*) !> double complex x(*) !> double precision rw(*) !> .. !>
!> !> ZQRINR updates a QR factorization after inserting a new row. i.e., !> given an m-by-m unitary matrix Q, an m-by-n upper trapezoidal matrix !> R and index j in the range 1:m+1, ZQRINR updates Q -> Q1 and !> R -> R1 so that Q1 is again unitary, R1 upper trapezoidal, and Q1*R1 !> = [A(1:j-1,:); x; A(j:m,:)], where A = Q*R. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | Q | !> Q is COMPLEX*16 array, dimension (ldq,*) !> On entry, the unitary matrix Q. On exit, the !> updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m+1. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m+1. !> |
| [in] | j | !> j is INTEGER !> The position of the new row in R1. 1 <= j <= m+1. !> |
| [in,out] | x | !> x is COMPLEX*16 array, dimension (*) !> On entry, the row being added. On exit, x is !> destroyed. !> |
| [out] | rw | !> rw is DOUBLE PRECISION array, dimension (*) !> A real workspace vector of size min(m,n). !> |
Definition at line 107 of file zqrinr.f90.
| subroutine zqrqh | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| real(real64), dimension(*), intent(in) | c, | ||
| complex(real64), dimension(*), intent(in) | s ) |
Converts an upper trapezoidal matrix to upper Hessenberg form.
!> subroutine zqrqh(m,n,R,ldr,c,s) !> !> .. Scalar Arguments .. !> integer m, n, ldr !> .. !> .. Array Arguments .. !> double complex R(ldr,*) !> double precision c(*) !> double complex s(*) !> .. !>
!> !> ZQRQH brings an upper trapezoidal matrix R into upper Hessenberg form !> using min(m-1,n) Givens rotations. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix R. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the upper Hessenberg matrix R. On exit, !> the updated upper trapezoidal matrix. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= m. !> |
| [in] | c | !> c is DOUBLE PRECISION array, dimension (*) !> The rotation cosines. Must contain at least !> min(m-1,n) elements. !> |
| [in] | s | !> s is COMPLEX*16 array, dimension (*) !> The rotation sines. Must contain at least !> min(m-1,n) elements. !> |
| subroutine zqrshc | ( | integer, intent(in) | m, |
| integer, intent(in) | n, | ||
| integer, intent(in) | k, | ||
| complex(real64), dimension(ldq,*), intent(inout) | q, | ||
| integer, intent(in) | ldq, | ||
| complex(real64), dimension(ldr,*), intent(inout) | r, | ||
| integer, intent(in) | ldr, | ||
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| complex(real64), dimension(*), intent(out) | w, | ||
| real(real64), dimension(*), intent(out) | rw ) |
Updates a QR factorization after a circular shift of columns.
!> subroutine zqrshc(m,n,k,Q,ldq,R,ldr,i,j,w,rw) !> !> .. Scalar Arguments .. !> integer m, n, k, ldq, ldr, i, j !> .. !> .. Array Arguments .. !> double complex Q(ldq,*) !> double complex R(ldr,*) !> double complex w(*) !> double precision rw(*) !> .. !>
!> !> ZQRSHC updates a QR factorization after circular shift of columns. !> i.e., given an m-by-k unitary matrix Q, an k-by-n upper trapezoidal !> matrix R and index j in the range 1:n+1, ZQRSHC updates the !> matrix Q -> Q1 and R -> R1 so that Q1 is again unitary, R1 upper !> trapezoidal, and Q1*R1 = A(:,p), where A = Q*R and p is the !> permutation [1:i-1,shift(i:j,-1),j+1:n] if i < j or !> [1:j-1,shift(j:i,+1),i+1:n] if j < i. (complex version) !>
| [in] | m | !> m is INTEGER !> The number of rows of the matrix Q. m >= 0. !> |
| [in] | n | !> n is INTEGER !> The number of columns of the matrix R. n >= 0. !> |
| [in] | k | !> k is INTEGER !> The number of columns of Q1, and rows of R1. Must be !> either k = m (full Q) or k = n <= m (economical form). !> |
| [in,out] | Q | !> Q is COMPLEX*16 array, dimension (ldq,*) !> On entry, the unitary m-by-k matrix Q. On exit, !> the updated matrix Q1. !> |
| [in] | ldq | !> ldq is INTEGER !> The leading dimension of Q. ldq >= m. !> |
| [in,out] | R | !> R is COMPLEX*16 array, dimension (ldr,*) !> On entry, the original matrix R. On exit, the !> updated matrix R1. !> |
| [in] | ldr | !> ldr is INTEGER !> The leading dimension of R. ldr >= k. !> |
| [in] | i | !> i is INTEGER !> The first index determining the range (see above). !> |
| [in] | j | !> j is INTEGER !> The second index determining the range (see above). !> |
| [out] | w | !> w is COMPLEX*16 array, dimension (*) !> A workspace vector of size k. !> |
| [out] | rw | !> rw is DOUBLE PRECISION array, dimension (*) !> A real workspace vector of size k. !> |
Definition at line 121 of file zqrshc.f90.