public class LinPack
extends java.lang.Object
Routines that I took from LINPACK library. So far, only dpbfa and dpbsl are taken. I hand-translated them from FORTRAN. I don't change the method names, just in case if you people are familiar with it already. Also, please pay attention to the parameter names. I removed all superfluous indices.
Constructor and Description |
---|
LinPack() |
Modifier and Type | Method and Description |
---|---|
static int |
dpbfa(double[][] abd,
int m)
dpbfa factors a double precision symmetric positive definite
matrix stored in band form.
|
static void |
dpbsl(double[][] abd,
int m,
double[] b)
dpbsl solves the double precision symmetric positive definite band system a*x = b
using the factors computed by dpbco or dpbfa.
|
public static final void dpbsl(double[][] abd, int m, double[] b)
dpbsl solves the double precision symmetric positive definite band system a*x = b using the factors computed by dpbco or dpbfa.
(Taken from LINPACK_D)
on entry
abd
- double precision(lda, n), the output from dpbco or dpbfa.lda
- integer, the leading dimension of the array abdn
- integer, the order of the matrix am
- integer, the number of diagonals above the main diagonal.b
- double precision(n), the right hand side vector.
On return
abd
- Banded matrix.m
- Band widthb
- the Y vector. Holds the output after the routine ends.public static final int dpbfa(double[][] abd, int m)
dpbfa factors a double precision symmetric positive definite matrix stored in band form.
dpbfa is usually called by dpbco, but it can be called directly with a saving in time if rcond is not needed.
(Taken from LINPACK_D)
on entry abd double precision(lda, n) the matrix to be factored. the columns of the upper triangle are stored in the columns of abd and the diagonals of the upper triangle are stored in the rows of abd . see the comments below for details. lda integer the leading dimension of the array abd. lda must be >= m + 1 n integer the order of the matrix a . m integer the number of diagonals above the main diagonal. 0 <= m < n on return abd an upper triangular matrix r , stored in band form, so that a = trans(r)*r . info integer = 0 for normal return. = k if the leading minor of order k is not positive definite. band storage if a is a symmetric positive definite band matrix, the following program segment will set up the input. m = (band width above diagonal) do 20 j = 1, n i1 = max0(1, j-m) do 10 i = i1, j k = i-j+m+1 abd(k,j) = a(i,j) 10 continue 20 continue linpack. this version dated 08/14/78 . cleve moler, university of new mexico, argonne national lab. begin block with ...exits to 40
abd
- Banded matrixm
- Band width