fortran-lapack
Loading...
Searching...
No Matches
la_lapack_lsq Module Reference

Least-squares drivers: QR, complete orthogonal, SVD and divide-and-conquer solutions. More...

Functions/Subroutines

subroutine, public la_sgels (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 SGELS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_dgels (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 DGELS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_qgels (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 QGELS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_sgelsy (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
 SGELSY: computes the minimum-norm solution to a real linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**T [ inv(T11)*Q1**T*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3. o The permutation of matrix B (the right hand side) is faster and more simple.
 
subroutine, public la_dgelsy (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
 DGELSY: computes the minimum-norm solution to a real linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**T [ inv(T11)*Q1**T*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3. o The permutation of matrix B (the right hand side) is faster and more simple.
 
subroutine, public la_qgelsy (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
 QGELSY: computes the minimum-norm solution to a real linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**T [ inv(T11)*Q1**T*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3. o The permutation of matrix B (the right hand side) is faster and more simple.
 
subroutine, public la_sgetsls (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 SGETSLS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_dgetsls (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 DGETSLS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_qgetsls (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 QGETSLS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_sgelsd (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info)
 SGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
 
subroutine, public la_dgelsd (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info)
 DGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
 
subroutine, public la_qgelsd (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info)
 QGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
 
subroutine, public la_sgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info)
 SGELSS: computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
 
subroutine, public la_dgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info)
 DGELSS: computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
 
subroutine, public la_qgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info)
 QGELSS: computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
 
subroutine, public la_cgels (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 CGELS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_zgels (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 ZGELS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_wgels (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 WGELS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_cgelsd (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info)
 CGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
 
subroutine, public la_zgelsd (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info)
 ZGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
 
subroutine, public la_wgelsd (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info)
 WGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
 
subroutine, public la_cgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info)
 CGELSS: computes the minimum norm solution to a complex linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
 
subroutine, public la_zgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info)
 ZGELSS: computes the minimum norm solution to a complex linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
 
subroutine, public la_wgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info)
 WGELSS: computes the minimum norm solution to a complex linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.
 
subroutine, public la_cgelsy (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info)
 CGELSY: computes the minimum-norm solution to a complex linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**H [ inv(T11)*Q1**H*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The permutation of matrix B (the right hand side) is faster and more simple. o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3.
 
subroutine, public la_zgelsy (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info)
 ZGELSY: computes the minimum-norm solution to a complex linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**H [ inv(T11)*Q1**H*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The permutation of matrix B (the right hand side) is faster and more simple. o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3.
 
subroutine, public la_wgelsy (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info)
 WGELSY: computes the minimum-norm solution to a complex linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**H [ inv(T11)*Q1**H*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The permutation of matrix B (the right hand side) is faster and more simple. o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3.
 
subroutine, public la_cgetsls (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 CGETSLS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_zgetsls (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 ZGETSLS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 
subroutine, public la_wgetsls (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
 WGETSLS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:
 

Detailed Description

Least-squares drivers: QR, complete orthogonal, SVD and divide-and-conquer solutions.

Function/Subroutine Documentation

◆ la_cgels()

subroutine, public la_lapack_lsq::la_cgels ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
complex(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

CGELS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'C' and m >= n: find the minimum norm solution of an underdetermined system A**H * X = B.
  4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**H * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_cgelsd()

subroutine, public la_lapack_lsq::la_cgelsd ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(sp), dimension(*), intent(out) s,
real(sp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(sp), dimension(*), intent(out) rwork,
integer(ilp), dimension(*), intent(out) iwork,
integer(ilp), intent(out) info )

CGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Here is the call graph for this function:

◆ la_cgelss()

subroutine, public la_lapack_lsq::la_cgelss ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(sp), dimension(*), intent(out) s,
real(sp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(sp), dimension(*), intent(out) rwork,
integer(ilp), intent(out) info )

CGELSS: computes the minimum norm solution to a complex linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.

Here is the call graph for this function:

◆ la_cgelsy()

subroutine, public la_lapack_lsq::la_cgelsy ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
integer(ilp), dimension(*), intent(inout) jpvt,
real(sp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(sp), dimension(*), intent(out) rwork,
integer(ilp), intent(out) info )

CGELSY: computes the minimum-norm solution to a complex linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**H [ inv(T11)*Q1**H*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The permutation of matrix B (the right hand side) is faster and more simple. o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3.

Here is the call graph for this function:

◆ la_cgetsls()

subroutine, public la_lapack_lsq::la_cgetsls ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
complex(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

CGETSLS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'C' and m >= n: find the minimum norm solution of an undetermined system A**T * X = B.
  4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_dgels()

subroutine, public la_lapack_lsq::la_dgels ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

DGELS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'T' and m >= n: find the minimum norm solution of an underdetermined system A**T * X = B.
  4. If TRANS = 'T' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_dgelsd()

subroutine, public la_lapack_lsq::la_dgelsd ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(dp), dimension(*), intent(out) s,
real(dp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), dimension(*), intent(out) iwork,
integer(ilp), intent(out) info )

DGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Here is the call graph for this function:

◆ la_dgelss()

subroutine, public la_lapack_lsq::la_dgelss ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(dp), dimension(*), intent(out) s,
real(dp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

DGELSS: computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.

Here is the call graph for this function:

◆ la_dgelsy()

subroutine, public la_lapack_lsq::la_dgelsy ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
integer(ilp), dimension(*), intent(inout) jpvt,
real(dp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

DGELSY: computes the minimum-norm solution to a real linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**T [ inv(T11)*Q1**T*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3. o The permutation of matrix B (the right hand side) is faster and more simple.

Here is the call graph for this function:

◆ la_dgetsls()

subroutine, public la_lapack_lsq::la_dgetsls ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

DGETSLS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'T' and m >= n: find the minimum norm solution of an undetermined system A**T * X = B.
  4. If TRANS = 'T' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_qgels()

subroutine, public la_lapack_lsq::la_qgels ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

QGELS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'T' and m >= n: find the minimum norm solution of an underdetermined system A**T * X = B.
  4. If TRANS = 'T' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_qgelsd()

subroutine, public la_lapack_lsq::la_qgelsd ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(qp), dimension(*), intent(out) s,
real(qp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), dimension(*), intent(out) iwork,
integer(ilp), intent(out) info )

QGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Here is the call graph for this function:

◆ la_qgelss()

subroutine, public la_lapack_lsq::la_qgelss ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(qp), dimension(*), intent(out) s,
real(qp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

QGELSS: computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.

Here is the call graph for this function:

◆ la_qgelsy()

subroutine, public la_lapack_lsq::la_qgelsy ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
integer(ilp), dimension(*), intent(inout) jpvt,
real(qp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

QGELSY: computes the minimum-norm solution to a real linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**T [ inv(T11)*Q1**T*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3. o The permutation of matrix B (the right hand side) is faster and more simple.

Here is the call graph for this function:

◆ la_qgetsls()

subroutine, public la_lapack_lsq::la_qgetsls ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

QGETSLS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'T' and m >= n: find the minimum norm solution of an undetermined system A**T * X = B.
  4. If TRANS = 'T' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_sgels()

subroutine, public la_lapack_lsq::la_sgels ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

SGELS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'T' and m >= n: find the minimum norm solution of an underdetermined system A**T * X = B.
  4. If TRANS = 'T' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_sgelsd()

subroutine, public la_lapack_lsq::la_sgelsd ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(sp), dimension(*), intent(out) s,
real(sp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), dimension(*), intent(out) iwork,
integer(ilp), intent(out) info )

SGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Here is the call graph for this function:

◆ la_sgelss()

subroutine, public la_lapack_lsq::la_sgelss ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(sp), dimension(*), intent(out) s,
real(sp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

SGELSS: computes the minimum norm solution to a real linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.

Here is the call graph for this function:

◆ la_sgelsy()

subroutine, public la_lapack_lsq::la_sgelsy ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
integer(ilp), dimension(*), intent(inout) jpvt,
real(sp), intent(in) rcond,
integer(ilp), intent(out) rank,
real(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

SGELSY: computes the minimum-norm solution to a real linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**T [ inv(T11)*Q1**T*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3. o The permutation of matrix B (the right hand side) is faster and more simple.

Here is the call graph for this function:

◆ la_sgetsls()

subroutine, public la_lapack_lsq::la_sgetsls ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
real(sp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
real(sp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(sp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

SGETSLS: solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'T' and m >= n: find the minimum norm solution of an undetermined system A**T * X = B.
  4. If TRANS = 'T' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_wgels()

subroutine, public la_lapack_lsq::la_wgels ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
complex(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

WGELS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'C' and m >= n: find the minimum norm solution of an underdetermined system A**H * X = B.
  4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**H * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_wgelsd()

subroutine, public la_lapack_lsq::la_wgelsd ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(qp), dimension(*), intent(out) s,
real(qp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(qp), dimension(*), intent(out) rwork,
integer(ilp), dimension(*), intent(out) iwork,
integer(ilp), intent(out) info )

WGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Here is the call graph for this function:

◆ la_wgelss()

subroutine, public la_lapack_lsq::la_wgelss ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(qp), dimension(*), intent(out) s,
real(qp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(qp), dimension(*), intent(out) rwork,
integer(ilp), intent(out) info )

WGELSS: computes the minimum norm solution to a complex linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.

Here is the call graph for this function:

◆ la_wgelsy()

subroutine, public la_lapack_lsq::la_wgelsy ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
integer(ilp), dimension(*), intent(inout) jpvt,
real(qp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(qp), dimension(*), intent(out) rwork,
integer(ilp), intent(out) info )

WGELSY: computes the minimum-norm solution to a complex linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**H [ inv(T11)*Q1**H*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The permutation of matrix B (the right hand side) is faster and more simple. o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3.

Here is the call graph for this function:

◆ la_wgetsls()

subroutine, public la_lapack_lsq::la_wgetsls ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(qp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(qp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
complex(qp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

WGETSLS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'C' and m >= n: find the minimum norm solution of an undetermined system A**T * X = B.
  4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_zgels()

subroutine, public la_lapack_lsq::la_zgels ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
complex(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

ZGELS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'C' and m >= n: find the minimum norm solution of an underdetermined system A**H * X = B.
  4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**H * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function:

◆ la_zgelsd()

subroutine, public la_lapack_lsq::la_zgelsd ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(dp), dimension(*), intent(out) s,
real(dp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(dp), dimension(*), intent(out) rwork,
integer(ilp), dimension(*), intent(out) iwork,
integer(ilp), intent(out) info )

ZGELSD: computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The problem is solved in three steps: (1) Reduce the coefficient matrix A to bidiagonal form with Householder transformations, reducing the original problem into a "bidiagonal least squares problem" (BLS) (2) Solve the BLS using a divide and conquer approach. (3) Apply back all the Householder transformations to solve the original least squares problem. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Here is the call graph for this function:

◆ la_zgelss()

subroutine, public la_lapack_lsq::la_zgelss ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
real(dp), dimension(*), intent(out) s,
real(dp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(dp), dimension(*), intent(out) rwork,
integer(ilp), intent(out) info )

ZGELSS: computes the minimum norm solution to a complex linear least squares problem: Minimize 2-norm(| b - A*x |). using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value.

Here is the call graph for this function:

◆ la_zgelsy()

subroutine, public la_lapack_lsq::la_zgelsy ( integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
integer(ilp), dimension(*), intent(inout) jpvt,
real(dp), intent(in) rcond,
integer(ilp), intent(out) rank,
complex(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
real(dp), dimension(*), intent(out) rwork,
integer(ilp), intent(out) info )

ZGELSY: computes the minimum-norm solution to a complex linear least squares problem: minimize || A * X - B || using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. The routine first computes a QR factorization with column pivoting: A * P = Q * [ R11 R12 ] [ 0 R22 ] with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A. Then, R22 is considered to be negligible, and R12 is annihilated by unitary transformations from the right, arriving at the complete orthogonal factorization: A * P = Q * [ T11 0 ] * Z [ 0 0 ] The minimum-norm solution is then X = P * Z**H [ inv(T11)*Q1**H*B ] [ 0 ] where Q1 consists of the first RANK columns of Q. This routine is basically identical to the original xGELSX except three differences: o The permutation of matrix B (the right hand side) is faster and more simple. o The call to the subroutine xGEQPF has been substituted by the the call to the subroutine xGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. o Matrix B (the right hand side) is updated with Blas-3.

Here is the call graph for this function:

◆ la_zgetsls()

subroutine, public la_lapack_lsq::la_zgetsls ( character, intent(in) trans,
integer(ilp), intent(in) m,
integer(ilp), intent(in) n,
integer(ilp), intent(in) nrhs,
complex(dp), dimension(lda,*), intent(inout) a,
integer(ilp), intent(in) lda,
complex(dp), dimension(ldb,*), intent(inout) b,
integer(ilp), intent(in) ldb,
complex(dp), dimension(*), intent(out) work,
integer(ilp), intent(in) lwork,
integer(ilp), intent(out) info )

ZGETSLS: solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, using a tall skinny QR or short wide LQ factorization of A. It is assumed that A has full rank. The following options are provided:

  1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
  2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
  3. If TRANS = 'C' and m >= n: find the minimum norm solution of an undetermined system A**T * X = B.
  4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**T * X ||. Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
Here is the call graph for this function: