These subroutines factor general band matrix A, stored in
general-band storage mode, using Gaussian elimination. 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 SGBS or DGBS, respectively.
| A | Subroutine |
| Short-precision real | SGBF |
| Long-precision real | DGBF |
| Fortran | CALL SGBF | DGBF (agb, lda, n, ml, mu, ipvt) |
| C and C++ | sgbf | dgbf (agb, lda, n, ml, mu, ipvt); |
| PL/I | CALL SGBF | DGBF (agb, lda, n, ml, mu, ipvt); |
The general band matrix A, stored in general-band storage mode, is factored using Gaussian elimination with partial pivoting to compute the LU factorization of A, where:
The transformed matrix A contains U in packed format, along with the multipliers necessary to construct, with the help of ipvt, a matrix L, such that A = LU. This factorization can then be used by SGBS or DGBS, respectively, to solve the system of equations. See reference [38].
Unable to allocate internal work area.
Matrix A is singular.
This example shows a factorization of a general band matrix A of order 9, with a lower band width of 2 and an upper band width of 3. On input matrix A is:
* *
| 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 |
| 4.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 |
| 0.0 5.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 |
| 0.0 0.0 6.0 1.0 1.0 1.0 1.0 1.0 0.0 |
| 0.0 0.0 0.0 7.0 1.0 1.0 1.0 1.0 1.0 |
| 0.0 0.0 0.0 0.0 8.0 1.0 1.0 1.0 1.0 |
| 0.0 0.0 0.0 0.0 0.0 9.0 1.0 1.0 1.0 |
| 0.0 0.0 0.0 0.0 0.0 0.0 10.0 11.0 12.0 |
* *
Matrix A is stored in general-band storage mode in the two-dimensional array AGB of size LDA by N, where LDA = 2ml+mu+16 = 23. The array AGB is declared as AGB(1:23,1:9).
AGB LDA N ML MU IPVT )
| | | | | |
CALL SGBF( AGB , 23 , 9 , 2 , 3 , IPVT )
* *
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 |
| 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 |
| 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 |
| 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 12.0000 |
| 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 11.0000 0.0000 |
| 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
AGB = | 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
* *
* *
| 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 |
| 0.0000 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 |
| 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 |
| 0.0000 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 12.0000 |
| 0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 11.0000 0.3111 |
| 0.2500 0.2000 0.1600 0.1400 0.1250 0.1100 0.1000 5.5380 -325.00 |
| 0.0000 0.1500 0.0000 0.0714 0.0000 -0.0556 -0.0306 0.9385 0.0000 |
| 0.2500 0.1500 0.1000 0.0714 -0.0714 -0.0694 -0.0194 0.0000 0.0000 |
| 0.2500 0.0000 0.1000 0.0000 0.0536 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
AGB = | 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
| 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 |
* *
IPVT = (2, -65534, -131070, -196606, -262142, -327678, -327678,
-327680, -327680)