
The SPPF and DPPF subroutines factor positive definite 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, and ZPOF subroutines factor matrix A stored in upper or lower storage mode, where:
Matrix A is factored using Cholesky factorization,
(LLT or UTU for SPOF
and DPOF and LLH or UHU
for CPOF and ZPOF). To solve the system of equations with one or more
right-hand sides, follow the call to these subroutines with a call to SPOSM,
DPOSM, CPOSM, or ZPOSM. To find the inverse of matrix A, follow the
call to SPOF or DPOF with a call to SPOICD or DPOICD.
| A | Subroutine |
| Short-precision real | SPPF and SPOF |
| Long-precision real | DPPF and DPOF |
| Short-precision complex | CPOF |
| Long-precision complex | ZPOF |
| Note: | The output from SPPF and DPPF should be used only as input to the following subroutines for performing a solve or inverse: SPPS/SPPICD and DPPS/DPPICD, respectively. The output from SPOF, DPOF, CPOF, and ZPOF should be used only as input to the following subroutines for performing a solve or inverse: SPOSM/SPOICD, DPOSM/DPOICD, CPOSM, and ZPOSM, respectively. |
| Fortran | CALL SPPF | DPPF (ap, n, iopt)
CALL SPOF | DPOF | CPOF | ZPOF (uplo, a, lda, n) |
| C and C++ | sppf | dppf (ap, n, iopt);
spof | dpof | cpof | zpof (uplo, a, lda, n); |
| PL/I | CALL SPPF | DPPF (ap, n, iopt);
CALL SPOF | DPOF | CPOF | ZPOF (uplo, a, lda, n); |
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, the array must have at least n(n+1)/2+n elements.
If iopt = 1, 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.
If iopt = 1, the matrix is factored using Cholesky factorization.
Specified as: a fullword integer; iopt = 0 or 1.
Returned as: a one-dimensional array, containing numbers of the data type indicated in Table 93.
If iopt = 0, the array contains n(n+1)/2+n elements.
If iopt = 1, the array contains n(n+1)/2 elements.
Returned as: a two-dimensional array, containing numbers of the data type indicated in Table 93.
The array specified for AP should not be altered between calls to the factorization and solve subroutines; otherwise unpredictable results may occur.
Function: The functions for these subroutines are described in the sections below.
For SPPF and DPPF: If iopt = 0, 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, 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].
For SPOF, DPOF, CPOF, and ZPOF: 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].
Resource Errors: Unable to allocate internal work area.
Example 1: 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.
| Note: | The AP arrays are formatted in a triangular arrangement for readability; however, they are stored in lower-packed storage mode. |
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)
Example 2: 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.
| Note: | The AP arrays are formatted in a triangular arrangement for readability; however, they are 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)
Example 3: 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 )
* *
| 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 |
* *
Example 4: 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 )
* *
| 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 |
* *
Example 5: 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) |
* *
| Note: | On input, the imaginary parts of the diagonal elements of the complex Hermitian matrix A are assumed to be zero, so you do not have to set these values. On output, they are set to zero. |
UPLO A LDA N
| | | |
CALL CPOF( 'L' , A , 3 , 3 )
* *
| (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) |
* *
Example 6: 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) |
* *
| Note: | On input, the imaginary parts of the diagonal elements of the complex Hermitian matrix A are assumed to be zero, so you do not have to set these values. On output, they are set to zero. |
UPLO A LDA N
| | | |
CALL CPOF( 'U' , A , 3 , 3 )
* *
| (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) |
* *