<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_LU_DECOMP(3) manual page</title> </head> <body bgcolor='white'> <a href='#toc'>Table of Contents</a><p> <h2><a name='sect0' href='#toc0'>Name</a></h2> im_lu_decomp, im_lu_solve - Solve SLEs by LU decomposition<br> <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> <br> <pre>#include <vips/vips.h> DOUBLEMASK *im_lu_decomp( const DOUBLEMASK *mat, const char *name ); int im_lu_solve( const DOUBLEMASK *lu, double *vec );</pre> <h2><a name='sect2' href='#toc2'></b>Description</a></h2> <a href='im_lu_decomp.3.html'><b>im_lu_decomp(3)</b></a> allocates a DOUBLEMASK representing the LU decomposition of the matrix in DOUBLEMASK <i>*mat</i>, and gives it the filename member <i>name</i>. <p> <a href='im_lu_solve.3.html'><b>im_lu_solve(3)</b></a> solves the system of linear equations (SLE) Ax=b, where matrix A has already been decomposed into LU form in DOUBLEMASK <i>*lu</i>. Input vector b is in <i>*vec</i> and is overwritten with output vector x. <p> DOUBLEMASK <i>*lu</i> is unaltered by <a href='im_matinv.3.html'><b>im_matinv(3)</b></a> , and can be used again to solve a different SLE containing matrix A. <h2><a name='sect3' href='#toc3'>Notes</a></h2> The scale and offset members of <i>*mat</i> are ignored. If they are not set to 1.0 and zero respectively, you must first call <a href='im_norm_dmask.3.html'><b>im_norm_dmask(3)</b></a> . <p> To understand the decomposition A=LU, see Press et al. (1992). For the exact format used to represent the matrices L and U in <i>*lu</i>, see the acompanying source code. <h2><a name='sect4' href='#toc4'>Errors</a></h2> If matrix <i>*mat</i> is singular (non-invertible), or close to singular then <a href='im_lu_decomp.3.html'><b>im_lu_decomp(3)</b></a> will fail, calling <a href='im_error.3.html'><b>im_error(3)</b></a> . <h2><a name='sect5' href='#toc5'>Return Value</a></h2> <a href='im_lu_decomp.3.html'><b>im_lu_decomp(3)</b></a> returns a pointer to the new DOUBLEMASK, or NULL on error. <p> <a href='im_lu_solve.3.html'><b>im_lu_solve(3)</b></a> always returns zero, unless <i>lu</i> was not returned by <a href='im_lu_decomp.3.html'><b>im_lu_decomp(3)</b></a> , when it returns -1. <h2><a name='sect6' href='#toc6'>See Also</a></h2> <a href='im_create_dmask.3.html'>im_create_dmask(3)</a> , <a href='im_free_dmask.3.html'>im_free_dmask(3)</a> , <a href='im_norm_dmask.3.html'>im_norm_dmask(3)</a> , <a href='im_matinv.3.html'>im_matinv(3)</a> <h2><a name='sect7' href='#toc7'>References</a></h2> PRESS, W. et al, 1992. Numerical Recipies in C; The Art of Scientific Computing, 2nd ed. Cambridge: Cambridge University Press, pp. 43-50. <p> [Available online: <a href='http://www.library.cornell.edu/nr/bookcpdf.html'>http://www.library.cornell.edu/nr/bookcpdf.html</a> accessed 2006-09-19] <h2><a name='sect8' href='#toc8'>Copyright</a></h2> <br> Copyright 2006, Tom Vajzovic. <h2><a name='sect9' href='#toc9'>Author</a></h2> Tom Vajzovic <p> <p> <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Notes</a></li> <li><a name='toc4' href='#sect4'>Errors</a></li> <li><a name='toc5' href='#sect5'>Return Value</a></li> <li><a name='toc6' href='#sect6'>See Also</a></li> <li><a name='toc7' href='#sect7'>References</a></li> <li><a name='toc8' href='#sect8'>Copyright</a></li> <li><a name='toc9' href='#sect9'>Author</a></li> </ul> </body> </html>