version 1.3, 2010/08/06 15:28:44
|
version 1.20, 2020/05/21 21:46:01
|
Line 1
|
Line 1
|
|
*> \brief \b DLATDF uses the LU factorization of the n-by-n matrix computed by sgetc2 and computes a contribution to the reciprocal Dif-estimate. |
|
* |
|
* =========== DOCUMENTATION =========== |
|
* |
|
* Online html documentation available at |
|
* http://www.netlib.org/lapack/explore-html/ |
|
* |
|
*> \htmlonly |
|
*> Download DLATDF + dependencies |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatdf.f"> |
|
*> [TGZ]</a> |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatdf.f"> |
|
*> [ZIP]</a> |
|
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatdf.f"> |
|
*> [TXT]</a> |
|
*> \endhtmlonly |
|
* |
|
* Definition: |
|
* =========== |
|
* |
|
* SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, |
|
* JPIV ) |
|
* |
|
* .. Scalar Arguments .. |
|
* INTEGER IJOB, LDZ, N |
|
* DOUBLE PRECISION RDSCAL, RDSUM |
|
* .. |
|
* .. Array Arguments .. |
|
* INTEGER IPIV( * ), JPIV( * ) |
|
* DOUBLE PRECISION RHS( * ), Z( LDZ, * ) |
|
* .. |
|
* |
|
* |
|
*> \par Purpose: |
|
* ============= |
|
*> |
|
*> \verbatim |
|
*> |
|
*> DLATDF uses the LU factorization of the n-by-n matrix Z computed by |
|
*> DGETC2 and computes a contribution to the reciprocal Dif-estimate |
|
*> by solving Z * x = b for x, and choosing the r.h.s. b such that |
|
*> the norm of x is as large as possible. On entry RHS = b holds the |
|
*> contribution from earlier solved sub-systems, and on return RHS = x. |
|
*> |
|
*> The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q, |
|
*> where P and Q are permutation matrices. L is lower triangular with |
|
*> unit diagonal elements and U is upper triangular. |
|
*> \endverbatim |
|
* |
|
* Arguments: |
|
* ========== |
|
* |
|
*> \param[in] IJOB |
|
*> \verbatim |
|
*> IJOB is INTEGER |
|
*> IJOB = 2: First compute an approximative null-vector e |
|
*> of Z using DGECON, e is normalized and solve for |
|
*> Zx = +-e - f with the sign giving the greater value |
|
*> of 2-norm(x). About 5 times as expensive as Default. |
|
*> IJOB .ne. 2: Local look ahead strategy where all entries of |
|
*> the r.h.s. b is chosen as either +1 or -1 (Default). |
|
*> \endverbatim |
|
*> |
|
*> \param[in] N |
|
*> \verbatim |
|
*> N is INTEGER |
|
*> The number of columns of the matrix Z. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] Z |
|
*> \verbatim |
|
*> Z is DOUBLE PRECISION array, dimension (LDZ, N) |
|
*> On entry, the LU part of the factorization of the n-by-n |
|
*> matrix Z computed by DGETC2: Z = P * L * U * Q |
|
*> \endverbatim |
|
*> |
|
*> \param[in] LDZ |
|
*> \verbatim |
|
*> LDZ is INTEGER |
|
*> The leading dimension of the array Z. LDA >= max(1, N). |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] RHS |
|
*> \verbatim |
|
*> RHS is DOUBLE PRECISION array, dimension (N) |
|
*> On entry, RHS contains contributions from other subsystems. |
|
*> On exit, RHS contains the solution of the subsystem with |
|
*> entries according to the value of IJOB (see above). |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] RDSUM |
|
*> \verbatim |
|
*> RDSUM is DOUBLE PRECISION |
|
*> On entry, the sum of squares of computed contributions to |
|
*> the Dif-estimate under computation by DTGSYL, where the |
|
*> scaling factor RDSCAL (see below) has been factored out. |
|
*> On exit, the corresponding sum of squares updated with the |
|
*> contributions from the current sub-system. |
|
*> If TRANS = 'T' RDSUM is not touched. |
|
*> NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL. |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] RDSCAL |
|
*> \verbatim |
|
*> RDSCAL is DOUBLE PRECISION |
|
*> On entry, scaling factor used to prevent overflow in RDSUM. |
|
*> On exit, RDSCAL is updated w.r.t. the current contributions |
|
*> in RDSUM. |
|
*> If TRANS = 'T', RDSCAL is not touched. |
|
*> NOTE: RDSCAL only makes sense when DTGSY2 is called by |
|
*> DTGSYL. |
|
*> \endverbatim |
|
*> |
|
*> \param[in] IPIV |
|
*> \verbatim |
|
*> IPIV is INTEGER array, dimension (N). |
|
*> The pivot indices; for 1 <= i <= N, row i of the |
|
*> matrix has been interchanged with row IPIV(i). |
|
*> \endverbatim |
|
*> |
|
*> \param[in] JPIV |
|
*> \verbatim |
|
*> JPIV is INTEGER array, dimension (N). |
|
*> The pivot indices; for 1 <= j <= N, column j of the |
|
*> matrix has been interchanged with column JPIV(j). |
|
*> \endverbatim |
|
* |
|
* Authors: |
|
* ======== |
|
* |
|
*> \author Univ. of Tennessee |
|
*> \author Univ. of California Berkeley |
|
*> \author Univ. of Colorado Denver |
|
*> \author NAG Ltd. |
|
* |
|
*> \date June 2016 |
|
* |
|
*> \ingroup doubleOTHERauxiliary |
|
* |
|
*> \par Further Details: |
|
* ===================== |
|
*> |
|
*> This routine is a further developed implementation of algorithm |
|
*> BSOLVE in [1] using complete pivoting in the LU factorization. |
|
* |
|
*> \par Contributors: |
|
* ================== |
|
*> |
|
*> Bo Kagstrom and Peter Poromaa, Department of Computing Science, |
|
*> Umea University, S-901 87 Umea, Sweden. |
|
* |
|
*> \par References: |
|
* ================ |
|
*> |
|
*> \verbatim |
|
*> |
|
*> |
|
*> [1] Bo Kagstrom and Lars Westin, |
|
*> Generalized Schur Methods with Condition Estimators for |
|
*> Solving the Generalized Sylvester Equation, IEEE Transactions |
|
*> on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751. |
|
*> |
|
*> [2] Peter Poromaa, |
|
*> On Efficient and Robust Estimators for the Separation |
|
*> between two Regular Matrix Pairs with Applications in |
|
*> Condition Estimation. Report IMINF-95.05, Departement of |
|
*> Computing Science, Umea University, S-901 87 Umea, Sweden, 1995. |
|
*> \endverbatim |
|
*> |
|
* ===================================================================== |
SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, |
SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, |
$ JPIV ) |
$ JPIV ) |
* |
* |
* -- LAPACK auxiliary routine (version 3.2) -- |
* -- LAPACK auxiliary routine (version 3.7.0) -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* November 2006 |
* June 2016 |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER IJOB, LDZ, N |
INTEGER IJOB, LDZ, N |
Line 15
|
Line 185
|
DOUBLE PRECISION RHS( * ), Z( LDZ, * ) |
DOUBLE PRECISION RHS( * ), Z( LDZ, * ) |
* .. |
* .. |
* |
* |
* Purpose |
|
* ======= |
|
* |
|
* DLATDF uses the LU factorization of the n-by-n matrix Z computed by |
|
* DGETC2 and computes a contribution to the reciprocal Dif-estimate |
|
* by solving Z * x = b for x, and choosing the r.h.s. b such that |
|
* the norm of x is as large as possible. On entry RHS = b holds the |
|
* contribution from earlier solved sub-systems, and on return RHS = x. |
|
* |
|
* The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q, |
|
* where P and Q are permutation matrices. L is lower triangular with |
|
* unit diagonal elements and U is upper triangular. |
|
* |
|
* Arguments |
|
* ========= |
|
* |
|
* IJOB (input) INTEGER |
|
* IJOB = 2: First compute an approximative null-vector e |
|
* of Z using DGECON, e is normalized and solve for |
|
* Zx = +-e - f with the sign giving the greater value |
|
* of 2-norm(x). About 5 times as expensive as Default. |
|
* IJOB .ne. 2: Local look ahead strategy where all entries of |
|
* the r.h.s. b is choosen as either +1 or -1 (Default). |
|
* |
|
* N (input) INTEGER |
|
* The number of columns of the matrix Z. |
|
* |
|
* Z (input) DOUBLE PRECISION array, dimension (LDZ, N) |
|
* On entry, the LU part of the factorization of the n-by-n |
|
* matrix Z computed by DGETC2: Z = P * L * U * Q |
|
* |
|
* LDZ (input) INTEGER |
|
* The leading dimension of the array Z. LDA >= max(1, N). |
|
* |
|
* RHS (input/output) DOUBLE PRECISION array, dimension N. |
|
* On entry, RHS contains contributions from other subsystems. |
|
* On exit, RHS contains the solution of the subsystem with |
|
* entries acoording to the value of IJOB (see above). |
|
* |
|
* RDSUM (input/output) DOUBLE PRECISION |
|
* On entry, the sum of squares of computed contributions to |
|
* the Dif-estimate under computation by DTGSYL, where the |
|
* scaling factor RDSCAL (see below) has been factored out. |
|
* On exit, the corresponding sum of squares updated with the |
|
* contributions from the current sub-system. |
|
* If TRANS = 'T' RDSUM is not touched. |
|
* NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL. |
|
* |
|
* RDSCAL (input/output) DOUBLE PRECISION |
|
* On entry, scaling factor used to prevent overflow in RDSUM. |
|
* On exit, RDSCAL is updated w.r.t. the current contributions |
|
* in RDSUM. |
|
* If TRANS = 'T', RDSCAL is not touched. |
|
* NOTE: RDSCAL only makes sense when DTGSY2 is called by |
|
* DTGSYL. |
|
* |
|
* IPIV (input) INTEGER array, dimension (N). |
|
* The pivot indices; for 1 <= i <= N, row i of the |
|
* matrix has been interchanged with row IPIV(i). |
|
* |
|
* JPIV (input) INTEGER array, dimension (N). |
|
* The pivot indices; for 1 <= j <= N, column j of the |
|
* matrix has been interchanged with column JPIV(j). |
|
* |
|
* Further Details |
|
* =============== |
|
* |
|
* Based on contributions by |
|
* Bo Kagstrom and Peter Poromaa, Department of Computing Science, |
|
* Umea University, S-901 87 Umea, Sweden. |
|
* |
|
* This routine is a further developed implementation of algorithm |
|
* BSOLVE in [1] using complete pivoting in the LU factorization. |
|
* |
|
* [1] Bo Kagstrom and Lars Westin, |
|
* Generalized Schur Methods with Condition Estimators for |
|
* Solving the Generalized Sylvester Equation, IEEE Transactions |
|
* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751. |
|
* |
|
* [2] Peter Poromaa, |
|
* On Efficient and Robust Estimators for the Separation |
|
* between two Regular Matrix Pairs with Applications in |
|
* Condition Estimation. Report IMINF-95.05, Departement of |
|
* Computing Science, Umea University, S-901 87 Umea, Sweden, 1995. |
|
* |
|
* ===================================================================== |
* ===================================================================== |
* |
* |
* .. Parameters .. |
* .. Parameters .. |
Line 175
|
Line 260
|
* |
* |
* Solve for U-part, look-ahead for RHS(N) = +-1. This is not done |
* Solve for U-part, look-ahead for RHS(N) = +-1. This is not done |
* in BSOLVE and will hopefully give us a better estimate because |
* in BSOLVE and will hopefully give us a better estimate because |
* any ill-conditioning of the original matrix is transfered to U |
* any ill-conditioning of the original matrix is transferred to U |
* and not to L. U(N, N) is an approximation to sigma_min(LU). |
* and not to L. U(N, N) is an approximation to sigma_min(LU). |
* |
* |
CALL DCOPY( N-1, RHS, 1, XP, 1 ) |
CALL DCOPY( N-1, RHS, 1, XP, 1 ) |