im_lu_decomp(3)
allocates a DOUBLEMASK representing the LU decomposition of the matrix in
DOUBLEMASK
*mat,
and gives it the filename member
name.
im_lu_solve(3)
solves the system of linear equations (SLE) Ax=b, where matrix A has already
been decomposed into LU form in DOUBLEMASK
*lu.
Input vector b is in
*vec
and is overwritten with output vector x.
DOUBLEMASK
*lu
is unaltered by
im_matinv(3),
and can be used again to solve a different SLE containing matrix A.
NOTES
The scale and offset members of
*mat
are ignored. If they are not set to 1.0 and zero respectively, you must first
call
im_norm_dmask(3).
To understand the decomposition A=LU, see Press et al. (1992). For the exact
format used to represent the matrices L and U in
*lu,
see the acompanying source code.
ERRORS
If matrix
*mat
is singular (non-invertible), or close to singular then
im_lu_decomp(3)
will fail, calling
im_error(3).
RETURN VALUE
im_lu_decomp(3)
returns a pointer to the new DOUBLEMASK, or NULL on error.
im_lu_solve(3)
always returns zero, unless
lu
was not returned by
im_lu_decomp(3),
when it returns -1.