// this matrix_h03.h file has the matrix inversion subroutines. // The pivoting subroutines ******************************************* #define arsubi(array, i, j) (arsub(array, vect[i], vect[j])) // indirectly pivots along the principal diagonal, down from i0. // WARNING: does not check anything. //void matrix_pivot(MAT *array, unsigned long *vect, unsigned long i0); // http://www.opengroup.org/onlinepubs/007904975/functions/calloc.html // allocates storage of imx elements of vect and initializes them sequentically. // CAUTION: remember to free the storage in the same subroutine which calls this matrix_cilloc. MATRIX_DLL_API int matrix_cilloc(unsigned long **vect, unsigned long imx); // allocates storage of imx elements of raw_array and initializes them to zero. // CAUTION: remember to free the storage in the same subroutine which calls this matrix_calloc. MATRIX_DLL_API int matrix_calloc(double **raw_array, unsigned long imx); // The partition and conquer matrix inversion algorithm *************** // it yields correct resuts only on certain matrices -- see documentation before use! // the array must be square. otherwise, will return with an error-code of 4. // a singular matrix will yield a matrix with each element equal to zero.. MATRIX_DLL_API int matrix_insitu_invert_partconq(MAT *array, double *determinant); // The LDU matrix inversion algorithm ********************************* // the array must be square. otherwise, will return with an error-code of 4. MATRIX_DLL_API int matrix_insitu_invert_ldu(MAT *array, double *determinant); // The Gauss-Jordan matrix inversion algorithm ********************************** // insitu inverts a square-matrix by the Gauss-Jordan algorithm, with full indirect-povoting. MATRIX_DLL_API int matrix_insitu_invert_GaussJordan(MAT *array, double *determinant); // The once and twice matrix inversion algorithms ******************************* MATRIX_DLL_API int matrix_insitu_inverse_once(MAT *array, double *determinant); MATRIX_DLL_API int matrix_insitu_inverse_twice(MAT *array, double *determinant, MAT *scratch_1, MAT *scratch_2); MATRIX_DLL_API int matrix_insitu_inverse(MAT *array, double *determinant, MAT *scratch_1, MAT *scratch_2); // copyright (c) 2003,4 by R.I. 'Scibor-Marchocki. last modified Monday 08-th March 2004. // eof