|These subroutines factor matrix A as explained |below: |
|The SPPF and DPPF subroutines factor positive definite |real symmetric matrix A, stored in lower-packed storage mode, |using Gaussian elimination (LDLT) or the Cholesky |factorization method. To solve a system of equations with one or more |right-hand sides, follow the call to these subroutines with one or more calls |to SPPS or DPPS, respectively. To find the inverse of matrix |A, follow the call to these subroutines, performing Cholesky |factorization, with a call to SPPICD or DPPICD, respectively.
|The SPOF, DPOF, CPOF, ZPOF, SPOTRF, DPOTRF, CPOTRF, and ZPOTRF subroutines |factor matrix A stored in upper or lower storage mode, where: |
|Matrix A is factored using Cholesky factorization as |follows: |
|To solve the system of equations with one or more right-hand sides, follow |the call to SPOF, DPOF, CPOF, ZPOF, SPOTRF, DPOTRF, CPOTRF, or ZPOTRF with a |call to SPOSM, DPOSM, CPOSM, ZPOSM, SPOTRS, DPOTRS, CPOTRS, or ZPOTRS, |respectively.
|To find the inverse of matrix A, follow the call to SPOF, DPOF, |SPOTRF, or DPOTRF with a call to SPOICD, DPOICD, SPOTRI, or DPOTRI. |
A | Subroutine |
Short-precision real | SPPF, SPOF, and SPOTRF |
Long-precision real | DPPF, DPOF, and DPOTRF |
Short-precision complex | CPOF and CPOTRF |
Long-precision complex | ZPOF and ZPOTRF |
Output from this subroutine: | Should be used only as input to the following subroutine(s) for performing a solve or inverse: |
---|---|
SPPF | SPPS, SPPICD |
DPPF | DPPS, DPPICD |
SPOF | SPOSM, SPOICD |
DPOF | DPOSM, DPOICD |
CPOF | CPOSM |
ZPOF | ZPOSM |
SPOTRF | SPOTRS, SPOTRI |
DPOTRF | DPOTRS, DPOTRI |
CPOTRF | CPOTRS |
ZPOTRF | ZPOTRS |
Fortran | CALL SPPF | DPPF (ap, n, iopt)
CALL SPOF | DPOF | CPOF | ZPOF (uplo, a, lda, n) CALL SPOTRF | DPOTRF | CPOTRF | ZPOTRF (uplo, n, a, lda, info) |
C and C++ | sppf | dppf (ap, n, iopt);
spof | dpof | cpof | zpof (uplo, a, lda, n); spotrf | dpotrf | cpotrf | zpotrf (uplo, n, a, lda, info); |
PL/I | CALL SPPF | DPPF (ap, n, iopt);
CALL SPOF | DPOF | CPOF | ZPOF (uplo, a, lda, n); CALL SPOTRF | DPOTRF | CPOTRF | ZPOTRF (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'.
Specified as: a one-dimensional array, containing numbers of the data type indicated in Table 93. See Notes.
If iopt = 0 |or 10, the array must have at least n(n+1)/2+n elements.
If iopt = 1 |or 11, the array must have at least n(n+1)/2 elements.
Specified as: an lda by (at least) n array, containing numbers of the data type indicated in Table 93.
Specified as: a fullword integer; lda > 0 and lda >= n.
Specified as: a fullword integer; n >= 0.
If iopt = 0, the matrix is factored using the LDLT method, |and the output is stored in an internal format.
If iopt = 1, the matrix is factored using Cholesky factorization, |and the output is stored in an internal format.
|If iopt = 10, the matrix is factored using the |LDLT method, and the output is stored in lower-packed |storage mode.
|If iopt = 11, the matrix is factored using Cholesky |factorization, and the output is stored in lower-packed storage |mode.
Specified as: a fullword integer; iopt = |0, 1, 10, or 11.
|If iopt is 0 or 1, the transformed matrix is stored in an |internal format and should only be used as input to the corresponding solve or |inverse subroutine.
|If iopt is 10 or 11, the transformed matrix is stored in |lower-packed storage mode.
Returned as: a one-dimensional array, containing numbers of the data type indicated in Table 93.
If iopt = 0 |or 10, the array contains n(n+1)/2+n elements.
If iopt = 1 |or 11, the array contains n(n+1)/2 elements.
Returned as: a two-dimensional array, containing numbers of the data type indicated in Table 93.
|If info = 0, the factorization completed |successfully.
|If info > 0, info is set equal to the order |i of the first minor encountered having a nonpositive |determinant.
|Specified as: a fullword integer; |info >= 0.
The array specified for AP should not be altered between calls to the factorization and solve subroutines; otherwise unpredictable results may occur.
The functions for these subroutines are described in the sections below.
If iopt = 0 |or 10, the positive definite symmetric matrix A, stored in lower-packed storage mode, is factored using Gaussian elimination, where A is expressed as:
where:
If iopt = 1 |or 11, the positive definite symmetric matrix A is factored using Cholesky factorization, where A is expressed as:
where L is a lower triangular matrix.
If n is 0, no computation is performed. See references [36] and [38].
The positive definite matrix A, stored in upper or lower storage mode, is factored using Cholesky factorization, where A is expressed as:
where:
If n is 0, no computation is performed. See references [8], [70], and [36].
Unable to allocate internal work area.
This example shows a factorization of positive definite symmetric matrix A of order 9, stored in lower-packed storage mode, where on input matrix 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 | * *
On output, all elements of this matrix A are 1.0.
AP N IOPT | | | CALL SPPF( AP, 9, 0 )
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 = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
This example shows a factorization of the same positive definite symmetric matrix A of order 9 used in Example 1, stored in lower-packed storage mode.
AP N IOPT | | | CALL SPPF( AP, 9, 1 )
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 = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
This example shows a factorization of the same positive definite symmetric matrix A of order 9 used in Example 1, but stored in lower storage mode.
UPLO A LDA N | | | | CALL SPOF( 'L' , A , 9 , 9 )
|or
| UPLO N A LDA INFO | | | | | | |CALL SPOTRF( 'L' , 9 , A , 9 , INFO )
* * | 1.0 . . . . . . . . | | 1.0 2.0 . . . . . . . | | 1.0 2.0 3.0 . . . . . . | | 1.0 2.0 3.0 4.0 . . . . . | A = | 1.0 2.0 3.0 4.0 5.0 . . . . | | 1.0 2.0 3.0 4.0 5.0 6.0 . . . | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 . . | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 . | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 | * *
* * | 1.0 . . . . . . . . | | 1.0 1.0 . . . . . . . | | 1.0 1.0 1.0 . . . . . . | | 1.0 1.0 1.0 1.0 . . . . . | A = | 1.0 1.0 1.0 1.0 1.0 . . . . | | 1.0 1.0 1.0 1.0 1.0 1.0 . . . | | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 . . | | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 . | | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 | * *
|INFO = 0
This example shows a factorization of the same positive definite symmetric matrix A of order 9 used in Example 1, but stored in upper storage mode.
UPLO A LDA N | | | | CALL SPOF( 'U' , A , 9 , 9 )
|or
| UPLO N A LDA INFO | | | | | | |CALL SPOTRF( 'U' , 9 , A , 9 , INFO )
* * | 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 | * *
* * | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 | | . 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 | | . . 1.0 1.0 1.0 1.0 1.0 1.0 1.0 | | . . . 1.0 1.0 1.0 1.0 1.0 1.0 | A = | . . . . 1.0 1.0 1.0 1.0 1.0 | | . . . . . 1.0 1.0 1.0 1.0 | | . . . . . . 1.0 1.0 1.0 | | . . . . . . . 1.0 1.0 | | . . . . . . . . 1.0 | * *
|INFO = 0
This example shows a factorization of positive definite complex Hermitian matrix A of order 3, stored in lower storage mode, where on input matrix A is:
* * | (25.0, 0.0) (-5.0, -5.0) (10.0, 5.0) | | (-5.0, 5.0) (51.0, 0.0) (4.0, -6.0) | | (10.0, -5.0) (4.0, 6.0) (71.0, 0.0) | * *
UPLO A LDA N | | | | CALL CPOF( 'L' , A , 3 , 3 )
|or
| UPLO N A LDA INFO | | | | | | |CALL CPOTRF( 'L' , 3 , A , 3 , INFO )
* * | (25.0, . ) . . | A = | (-5.0, 5.0) (51.0, . ) . | | (10.0, -5.0) ( 4.0, 6.0) (71.0, . ) | * *
* * | ( 5.0, 0.0) . . | A = | (-1.0, 1.0) (7.0, 0.0) . | | ( 2.0, -1.0) (1.0, 1.0) (8.0, 0.0) | * *
|INFO = 0
This example shows a factorization of positive definite complex Hermitian matrix A of order 3, stored in upper storage mode, where on input matrix A is:
* * | (9.0, 0.0) (3.0, 3.0) (3.0, -3.0) | | (3.0, -3.0) (18.0, 0.0) (8.0, -6.0) | | (3.0, 3.0) (8.0, 6.0) (43.0, 0.0) | * *
UPLO A LDA N | | | | CALL CPOF( 'U' , A , 3 , 3 )
|or
| UPLO N A LDA INFO | | | | | | |CALL CPOTRF( 'U' , 3 , A , 3 , INFO )
* * | (9.0, . ) ( 3.0,3.0) ( 3.0,-3.0) | A = | . (18.0, . ) ( 8.0,-6.0) | | . . (43.0, . ) | * *
* * | (3.0, 0.0) (1.0, 1.0) (1.0, -1.0) | A = | . (4.0, 0.0) (2.0, -1.0) | | . . (6.0, 0.0) | * *
|INFO = 0