Mercurial > hg > octave-lyh
changeset 6531:c2609d0502bb
[project @ 2007-04-17 18:17:40 by jwe]
author | jwe |
---|---|
date | Tue, 17 Apr 2007 18:17:40 +0000 |
parents | f80cc454860d |
children | 25cad08843a0 |
files | doc/ChangeLog doc/interpreter/linalg.txi doc/interpreter/octave.texi doc/interpreter/preface.txi doc/interpreter/sparse.txi |
diffstat | 5 files changed, 64 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2007-04-17 David Bateman <dbateman@free.fr> + + * interpreter/linalg.txi (Techniques used for Linear Algebra): + New node. + * interpreter/octave.texi: Include it in menu. + * interpreter/sparse.txi: Delete discusion of matrix_type. + 2007-04-16 John W. Eaton <jwe@octave.org> * interpreter/stream.txi: Delete. @@ -19,13 +26,6 @@ * interpreter/container.txi: Document indexing with (). -2007-04-11 David Bateman <dbateman@free.fr> - - * interpreter/linalg.txi (Techniques used for Linear Algebra): - New node. - * interpreter/octave.texi: Include it in menu. - * interpreter/sparse.txi: Delete discusion of matrix_type. - 2007-04-11 Søren Hauberg <hauberg@gmail.com> * interpreter/container.txi: Improve cell array documentation.
--- a/doc/interpreter/linalg.txi +++ b/doc/interpreter/linalg.txi @@ -11,11 +11,59 @@ 1989, and in @cite{@sc{Lapack} Users' Guide}, SIAM, 1992. @menu +* Techniques used for Linear Algebra:: * Basic Matrix Functions:: * Matrix Factorizations:: * Functions of a Matrix:: @end menu +@node Techniques used for Linear Algebra +@section Techniques used for Linear Algebra + +Octave includes a poly-morphic solver, that selects an appropriate +matrix factorization depending on the properties of the matrix itself. +Generally, the cost of determining the matrix type is small relative to +the cost of factorizing the matrix itself, but in any case the matrix +type is cached once it is calculated, so that it is not re-determined +each time it is used in a linear equation. + +The selection tree for how the linear equation is solve or a matrix +inverse is form is given by + +@enumerate 1 +@item If the matrix is upper or lower triangular sparse a forward or +backward substition using the @sc{Lapack} xTRTRS function, and goto 4. + +@c Permuted triangular matrices currently disabled in the code +@c +@c @item If the matrix is a upper triangular matrix with column permutations +@c or lower triangular matrix with row permutations, perform a forward or +@c backward substitution, and goto 5. + +@item If the matrix is square, hermitian with a real positive diagonal, +attempt Cholesky factorization using the @sc{Lapack} xPOTRF function. + +@item If the Cholesky factorization failed or the matrix is not +hermitian with a real positive diagonal, and the matrix is square, factorize +using the @sc{Lapack} xGETRF function. + +@item If the matrix is not square, or any of the previous solvers flags +a singular or near singular matrix, find a least squares solution using +the @sc{Lapack} xGELSS function. +@end enumerate + +The user can force the type of the matrix with the @code{matrix_type} +function. This overcomes the cost of discovering the type of the matrix. +However, it should be noted incorrectly identifying the type of the matrix +will lead to unpredictable results, and so @code{matrix_type} should be +used with care. + +It should be noted that the test for whether a matrix is a candidate for +Cholesky factorization, performed above and by the @code{matrix_type} +function, does not give a certainty that the matrix is +Hermitian. However, the attempt to factorize the matrix will quickly +flag a non-Hermitian matrix. + @node Basic Matrix Functions @section Basic Matrix Functions @@ -35,6 +83,8 @@ @DOCSTRING(inv) +@DOCSTRING(matrix_type) + @DOCSTRING(norm) @DOCSTRING(null)
--- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -382,6 +382,7 @@ Linear Algebra +* Techniques used for Linear Algebra:: * Basic Matrix Functions:: * Matrix Factorizations:: * Functions of a Matrix::
--- a/doc/interpreter/preface.txi +++ b/doc/interpreter/preface.txi @@ -57,9 +57,9 @@ @unnumberedsec Acknowledgements @cindex acknowledgements -Many people have already contributed to Octave's development. In -addition to John W. Eaton, the following people have helped write parts -of Octave or helped out in various other ways (listed alphbetically). +Many people have already contributed to Octave's development. The +following people have helped write parts of Octave or helped out in +various other ways (listed alphbetically). @noindent Andy Adler, Joel Andersson, Muthiah Annamalai, @@ -74,7 +74,7 @@ John W. Eaton, Dirk Eddelbuettel, Paul Eggert, Stephen Eglen, Peter Ekberg, Rolf Fabian, Stephen Fegan, Ramon Garcia Fernandez, Torsten Finke, Jose Daniel Munoz Frias, Castor Fu, Eduardo Gallestey, Walter Gautschi, -Klaus Gebhardt, Driss Ghaddab, Nicolo Giorgetti, From Michael Goffioul, +Klaus Gebhardt, Driss Ghaddab, Nicolo Giorgetti, Michael Goffioul, Glenn Golden, Tomislav Goles, Keith Goodman, Etienne Grossmann, Kai Habel, William Poetra Yoga Hadisoeseno, Benjamin Hall, Kim Hansen, Soren Hauberg, Daniel Heiserer, Yozo Hida,
--- a/doc/interpreter/sparse.txi +++ b/doc/interpreter/sparse.txi @@ -1425,8 +1425,6 @@ @emph{Not implemented} @item eigs @emph{Not implemented} -@item @ref{matrix_type} -Identify the matrix type or mark a matrix as a particular type. @item @ref{normest} Estimates the 2-norm of the matrix @var{a} using a power series analysis. @item @ref{spchol} @@ -1538,8 +1536,6 @@ matrix. * luinc:: Produce the incomplete LU factorization of the sparse A. -* matrix_type:: Identify the matrix type or mark a matrix as a particular - type. * normest:: Estimates the 2-norm of the matrix @var{a} using a power series analysis. * nnz:: returns number of non zero elements in SM See also: sparse @@ -1656,18 +1652,12 @@ @DOCSTRING(issparse) -@node luinc, matrix_type, issparse, Function Reference +@node luinc, normest, issparse, Function Reference @subsubsection luinc @DOCSTRING(luinc) -@node matrix_type, normest, luinc, Function Reference -@subsubsection matrix_type - -@DOCSTRING(matrix_type) - - -@node normest, nnz, matrix_type, Function Reference +@node normest, nnz, luinc, Function Reference @subsubsection normest @DOCSTRING(normest)