These subroutines factor positive definite symmetric band matrix A, stored in lower-band-packed storage mode, using:
To solve the system of equations with one or more right-hand sides, follow
the call to these subroutines with one or more calls to SPBS, DPBS, SPBCHS, or
DPBCHS, respectively.
| A | Subroutine |
| Short-precision real | SPBF and SPBCHF |
| Long-precision real | DPBF and DPBCHF |
Notes:
| Fortran | CALL SPBF | DPBF | SPBCHF | DPBCHF (apb, lda, n, m) |
| C and C++ | spbf | dpbf | spbchf | dpbchf (apb, lda, n, m); |
| PL/I | CALL SPBF | DPBF | SPBCHF | DPBCHF (apb, lda, n, m); |
The positive definite symmetric band matrix A, stored in lower-band-packed storage mode, is factored using Gaussian elimination in SPBF and DPBF and Cholesky factorization in SPBCHF and DPBCHF. The transformed matrix A contains the results of the factorization in packed format. This factorization can then be used by SPBS, DPBS, SPBCHS, and DPBCHS, respectively, to solve the system of equations.
For performance reasons, divides are done in a way that reduces the effective exponent range for which DPBF works properly, when processing narrow band widths; therefore, you may want to scale your problem.
Unable to allocate internal work area.
This example shows a factorization of a real positive definite symmetric band matrix A of order 9, using Gaussian elimination, where on input, matrix A is:
* *
| 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 |
| 1.0 2.0 2.0 1.0 0.0 0.0 0.0 0.0 0.0 |
| 1.0 2.0 3.0 2.0 1.0 0.0 0.0 0.0 0.0 |
| 0.0 1.0 2.0 3.0 2.0 1.0 0.0 0.0 0.0 |
| 0.0 0.0 1.0 2.0 3.0 2.0 1.0 0.0 0.0 |
| 0.0 0.0 0.0 1.0 2.0 3.0 2.0 1.0 0.0 |
| 0.0 0.0 0.0 0.0 1.0 2.0 3.0 2.0 1.0 |
| 0.0 0.0 0.0 0.0 0.0 1.0 2.0 3.0 2.0 |
| 0.0 0.0 0.0 0.0 0.0 0.0 1.0 2.0 3.0 |
* *
and on output, matrix A is:
* *
| 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 |
| 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 |
| 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 |
| 0.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 |
| 0.0 0.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 |
| 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 0.0 |
| 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 |
| 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 |
| 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 |
* *
where array location APB(2,9) is set to 0.0.
APB LDA N M
| | | |
CALL SPBF( APB , 3 , 9 , 2 )
* *
| 1.0 2.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 |
APB = | 1.0 2.0 2.0 2.0 2.0 2.0 2.0 2.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 |
APB = | 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 |
| 1.0 1.0 1.0 1.0 1.0 1.0 1.0 . . |
* *
This example shows a Cholesky factorization of the same matrix used in Example 1.
APB LDA N M
| | | |
CALL SPBCHF( APB , 3 , 9 , 2 )
* *
| 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 |
APB = | 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 . . |
* *