|
****** |
i n p u t ******
|
|
w.....work array of size | | |
(nroww,nrow) containing the interesting
|
|
part of a banded matrix | | |
a , with the diagonals or bands of a
|
|
stored in the rows of | | |
w , while columns of a correspond to
|
|
columns of | | |
w . this is the storage mode used in linpack and
results in efficient innermost loops.
|
|
explicitly, | | |
a has nbandl bands below the diagonal
|
|
o
|
1 (main) diagonal
|
|
o
|
nbandu bands above the diagonal
|
|
|
|
|
|
and thus, with | | |
middle = nbandu + 1,
|
|
a(i+j,j) | | |
is in w(i+middle,j) for i=-nbandu,...,nbandl
j=1,...,nrow .
for example, the interesting entries of a (1,2)-banded matrix
|
|
|
|
of order | | |
9 would appear in the first 1+1+2 = 4 rows of w
as follows.
|
|
all other entries of | | |
w not identified in this way with an en-
|
|
try of |
a are never referenced .
|
|
|
|
nroww.....row dimension of the work array | | |
w .
|
|
must be | | |
[char46]ge. nbandl + 1 + nbandu .
|
|
|
|
nbandl.....number of bands of | | |
a below the main diagonal
|
|
nbandu.....number of bands of | | |
a above the main diagonal .
|
|
|
|
****** |
o u t p u t ******
iflag.....integer indicating success( = 1) or failure ( = 2) .
|
|
w.....contains the lu-factorization of |
| |
a into a unit lower triangu-
|
|
lar matrix | | |
l and an upper triangular matrix u (both banded)
and stored in customary fashion over the corresponding entries
|
|
of |
a . this makes it possible to solve any particular linear
|
|
system |
a*x = b for x by a
call banslv ( w, nroww, nrow, nbandl, nbandu, b )
|
|
with the solution x | | |
contained in b on return .
|
|
|
|
if |
iflag = 2, then
|
|
one of |
nrow-1, nbandl,nbandu failed to be nonnegative, or else
one of the potential pivots was found to be zero indicating
|
|
that |
a does not have an lu-factorization. this implies that
|
|
a |
is singular in case it is totally positive .
|
|
|
|
****** |
m e t h o d ******
|
|
gauss elimination | | |
w i t h o u t pivoting is used. the routine is
|
|
|
|
intended for use with matrices |
| |
a which do not require row inter-
|
|
changes during factorization, especially for the | | |
t o t a l l y
|
|
p o s i t i v e | | |
matrices which occur in spline calculations.
the routine should not be used for an arbitrary banded matrix.
|
|
|
|