|These subroutines find the inverse of positive definite real symmetric matrix A using Cholesky factorization, where:
|Subroutines SPPICD, DPPICD, SPOICD, and DPOICD also find the
|reciprocal of the condition number and the determinant of matrix
|A.
A, aux, rcond, det | Subroutine |
Short-precision real | SPPICD, SPOICD, and SPOTRI |
Long-precision real | DPPICD, DPOICD, and DPOTRI |
|For SPOTRI and DPOTRI, the input |must be the output from the factorization subroutines SPOTRF or DPOTRF, |respectively. |
Fortran | CALL SPPICD | DPPICD (ap, n, iopt,
rcond, det, aux, naux)
CALL SPOICD | DPOICD (uplo, a, lda, n, iopt, rcond, det, aux, naux) CALL SPOTRI | DPOTRI (uplo, n, a, lda, info) |
C and C++ | sppicd | dppicd (ap, n, iopt, rcond,
det, aux, naux);
spoicd | dpoicd (uplo, a, lda, n, iopt, rcond, det, aux, naux); spotri | dpotri (uplo, n, a, lda, info); |
PL/I | CALL SPPICD | DPPICD (ap, n, iopt,
rcond, det, aux, naux);
CALL SPOICD | DPOICD (uplo, a, lda, n, iopt, rcond, det, aux, naux); CALL SPOTRI | DPOTRI (uplo, n, a, lda, info); |
If uplo = 'U', A is stored in upper storage mode.
If uplo = 'L', A is stored in lower storage mode.
Specified as: a single character. It must be 'U' or 'L'.
If iopt = 0, 1, 2, or 3, then AP contains the positive definite real symmetric matrix A, whose inverse, condition number reciprocal, and determinant are computed, where matrix A is stored in lower-packed storage mode.
If iopt = 4, then AP contains the transformed matrix A of order n, resulting from the Cholesky factorization performed in a previous call to SPPF or DPPF, respectively, whose inverse is computed.
Specified as: a one-dimensional array of (at least) length n(n+1)/2, containing numbers of the data type indicated in Table 101.
If iopt = 0, 1, 2, or 3, it is the positive definite real symmetric matrix A, whose inverse, condition number reciprocal, and determinant are computed, where matrix A is stored in upper or lower storage mode.
If iopt = 4, it is the transformed matrix A of order n, containing results of the factorization from a previous call to SPOF/SPOFCD or DPOF/DPOFCD, respectively, whose inverse is computed. |
|It is the transformed matrix A of order n, containing |results of the factorization from a previous call to SPOTRF or DPOTRF, |respectively, whose inverse is computed.
Specified as: an |lda by (at least) n array, containing numbers of the data type indicated in Table 101.
If iopt = 0, the inverse is computed for matrix A.
If iopt = 1, the inverse and the reciprocal of the condition number are computed for matrix A.
If iopt = 2, the inverse and the determinant are computed for matrix A.
If iopt = 3, the inverse, the reciprocal of the condition number, and the determinant are computed for matrix A.
If iopt = 4, the inverse is computed for the (Cholesky) factored matrix A.
Specified as: a fullword integer; iopt = 0, 1, 2, 3, or 4.
If naux = 0 and error 2015 is unrecoverable, aux is ignored.
Otherwise, it is the storage work area used by this subroutine. Its size is specified by naux. Specified as: an area of storage, containing numbers of the data type indicated in Table 101.
If naux = 0 and error 2015 is unrecoverable, SPPICD, DPPICD, SPOICD, |and DPOICD dynamically allocate the work area used by the subroutine. The work area is deallocated before control is returned to the calling program.
Otherwise, naux >= n.
where 1 <= det1 < 10. Returned as: an array of length 2, containing numbers of the data type indicated in Table 101.
|If info = 0, the inverse completed |successfully.
|If info > 0, info is set equal to the |first i, where Aii is zero; the matrix is |not positive definite, and its inverse could not be completed.
|Specified as: a fullword integer; |info >= 0.
These subroutines perform the following function:
|Find the inverse, the reciprocal of the condition number, and the determinant of positive definite symmetric matrix A using Cholesky factorization, where:
The iopt argument is used to determine the combination of output items produced by this subroutine: the inverse, the reciprocal of the condition number, and the determinant. |
If n is 0, no computation is performed. See references [36], [38], and [44].
Matrix A is not positive definite.
|The inverse of matrix A could not be computed. |
|The inverse of matrix A could not be computed. |
This example uses SPPICD to compute the inverse, reciprocal of the condition number, and determinant of matrix A. Where A is:
* * | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 | | 1.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 | | 1.0 2.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 | | 1.0 2.0 3.0 4.0 4.0 4.0 4.0 4.0 4.0 | | 1.0 2.0 3.0 4.0 5.0 5.0 5.0 5.0 5.0 | | 1.0 2.0 3.0 4.0 5.0 6.0 6.0 6.0 6.0 | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 7.0 7.0 | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 8.0 | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 | * *
The values used to compute the reciprocal of the condition number in this example are obtained with the following values:
On output, the value in det, |A|, is equal to 1, and RCOND = 1/180.
AP N IOPT RCOND DET AUX NAUX | | | | | | | CALL SPPICD( AP , 9 , 3 , RCOND , DET , AUX , 9 ) AP = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 6.0, 6.0, 6.0, 6.0, 7.0, 7.0, 7.0, 8.0, 8.0, 9.0)
AP = (2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 2.0, -1.0, 0.0, 2.0, -1.0, 1.0) RCOND = 0.005556 DET = (1.0, 0.0)
This example uses SPPICD to compute the inverse of matrix A, where iopt = 4, and matrix A is the transformed matrix factored in Example 1 by SPPF.
AP N IOPT RCOND DET AUX NAUX | | | | | | | CALL SPPICD(AP , 9 , 4 , RCOND , DET , AUX , 9)
AP = (2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 2.0, -1.0, 0.0, 2.0, -1.0, 1.0)
This example uses SPOICD to compute the inverse, reciprocal of the condition number, and determinant of the same matrix A used in Example 1; however, matrix A is stored in upper storage mode in this example.
The values used to compute the reciprocal of the condition number in this example are obtained with the following values:
On output, the value in det, |A|, is equal to 1, and RCOND = 1/180.
UPLO A LDA N IOPT RCOND DET AUX NAUX | | | | | | | | | CALL SPOICD( 'U' , A , 9 , 9 , 3 , RCOND , DET , AUX , 9 ) * * | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 | | . 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 | | . . 3.0 3.0 3.0 3.0 3.0 3.0 3.0 | | . . . 4.0 4.0 4.0 4.0 4.0 4.0 | A = | . . . . 5.0 5.0 5.0 5.0 5.0 | | . . . . . 6.0 6.0 6.0 6.0 | | . . . . . . 7.0 7.0 7.0 | | . . . . . . . 8.0 8.0 | | . . . . . . . . 9.0 | * *
* * | 2.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | . 2.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 | | . . 2.0 -1.0 0.0 0.0 0.0 0.0 0.0 | | . . . 2.0 -1.0 0.0 0.0 0.0 0.0 | A = | . . . . 2.0 -1.0 0.0 0.0 0.0 | | . . . . . 2.0 -1.0 0.0 0.0 | | . . . . . . 2.0 -1.0 0.0 | | . . . . . . . 2.0 -1.0 | | . . . . . . . . 1.0 | * * RCOND = 0.005555556 DET = (1.0, 0.0)
This example uses SPOICD or SPOTRI to compute the inverse of matrix A, where iopt = 4, and matrix A is the transformed matrix factored by |SPOF or SPOTRF in Example 1.
UPLO A LDA N IOPT RCOND DET AUX NAUX | | | | | | | | | CALL SPOICD( 'U' , A , 9 , 9 , 4 , RCOND , DET , AUX , 9 )
|or
| UPLO N A LDA INFO | | | | | | |CALL SPOTRI( 'U' , 9 , A , 9 , INFO )
* * | 2.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | . 2.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 | | . . 2.0 -1.0 0.0 0.0 0.0 0.0 0.0 | | . . . 2.0 -1.0 0.0 0.0 0.0 0.0 | A = | . . . . 2.0 -1.0 0.0 0.0 0.0 | | . . . . . 2.0 -1.0 0.0 0.0 | | . . . . . . 2.0 -1.0 0.0 | | . . . . . . . 2.0 -1.0 | | . . . . . . . . 1.0 | * *
|INFO = 0