diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
commit | 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch) | |
tree | 3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/double/minv.c | |
parent | c117dd5fb183afb1a4790a6f6110d88704be6bf8 (diff) |
Totally rework the math library, this time based on the MacOs X
math library (which is itself based on the math lib from FreeBSD).
-Erik
Diffstat (limited to 'libm/double/minv.c')
-rw-r--r-- | libm/double/minv.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/libm/double/minv.c b/libm/double/minv.c deleted file mode 100644 index df788fecf..000000000 --- a/libm/double/minv.c +++ /dev/null @@ -1,61 +0,0 @@ -/* minv.c - * - * Matrix inversion - * - * - * - * SYNOPSIS: - * - * int n, errcod; - * double A[n*n], X[n*n]; - * double B[n]; - * int IPS[n]; - * int minv(); - * - * errcod = minv( A, X, n, B, IPS ); - * - * - * - * DESCRIPTION: - * - * Finds the inverse of the n by n matrix A. The result goes - * to X. B and IPS are scratch pad arrays of length n. - * The contents of matrix A are destroyed. - * - * The routine returns nonzero on error; error messages are printed - * by subroutine simq(). - * - */ - -minv( A, X, n, B, IPS ) -double A[], X[]; -int n; -double B[]; -int IPS[]; -{ -double *pX; -int i, j, k; - -for( i=1; i<n; i++ ) - B[i] = 0.0; -B[0] = 1.0; -/* Reduce the matrix and solve for first right hand side vector */ -pX = X; -k = simq( A, B, pX, n, 1, IPS ); -if( k ) - return(-1); -/* Solve for the remaining right hand side vectors */ -for( i=1; i<n; i++ ) - { - B[i-1] = 0.0; - B[i] = 1.0; - pX += n; - k = simq( A, B, pX, n, -1, IPS ); - if( k ) - return(-1); - } -/* Transpose the array of solution vectors */ -mtransp( n, X, X ); -return(0); -} - |