NAME
ludcmp,ludcmp0 -- LU decomposition of matrix
PROTOTYPES
void ludcmp0(float *a, int n, int *indx, float *d)
void ludcmp(float **a, int n, int *indx, float *d)
ARGUMENTS
- float *a
- Matrix (input and output), linear storage of elements in a C-vector.
- int n
- Dimension of matrix Dimension of matrix
- int *indx
- Index array Index array
- float *d
- Index array of row interchanges (see DESCRIPTION) Index array of row interchanges (see DESCRIPTION)
- float **a
- Matrix (input and output)
DESCRIPTION:
given an (n x n) matrix 'a[1..n][1..n]', (a[0..n-1][0..n-1] for ludcmp0)
this routine replaces it by the
>>LU decomposition<< of a rowwise permutation of itself. 'a' and 'n' are
input, 'a' is output, arranged as in, for instance n=4:
/ a11 a12 a13 a14 \ / b11 b12 b13 b14 \
| a21 a22 a23 a24 | = | c21 b22 b23 b24 |
| a31 a32 a33 a34 | | c31 c32 b33 b34 |
\ a41 a42 a43 a44 / \ c41 c42 c43 b44 /
'indx[1..n]' ( indx[0..n-1] for ludcmp0 )
is an output vector which records the row permutation
effected by the partial pivoting; 'd' is output as +/-1 depending
on wether the number of row interchanges was even or odd, respectively.
This routine is used in combination with routine 'lubksb()' (
lubksb0 for index range 0..n-1) to solve
linear equations or invert a matrix.
NOTE:
NOTE:
The 0-version uses a linear array for the matrix, the other version
uses a pointer array, as described in the numerical Recipes.
FILE
/local/homes/rhaschke/nst7/man/../o.linx86//../nstsrc/nst_numr.c