Mercurial > hg > octave-lojdl
changeset 7567:6b07c15eb8e1
Document positive definite behavior of matrix_type
author | David Bateman <dbateman@free.fr> |
---|---|
date | Thu, 06 Mar 2008 13:46:16 -0500 |
parents | b3acdf1c41a5 |
children | f3b1f26dc44e |
files | src/ChangeLog src/DLD-FUNCTIONS/matrix_type.cc |
diffstat | 2 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-03-06 David Bateman <dbateman@free.fr> + + * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Document that + the initial interpretation of a positive definite return from + matrix_type is that the matrix is "probably" positive definite and + not certainly so. + 2008-03-06 John W. Eaton <jwe@octave.org> * parse.y: Move tests here from test/test_eval.m.
--- a/src/DLD-FUNCTIONS/matrix_type.cc +++ b/src/DLD-FUNCTIONS/matrix_type.cc @@ -59,7 +59,7 @@ Mark the matrix as full.\n\ \n\ @item 'positive definite'\n\ -Full positive definite matrix.\n\ +Probable full positive definite matrix.\n\ \n\ @item 'diagonal'\n\ Diagonal Matrix. (Sparse matrices only)\n\ @@ -83,8 +83,8 @@ @itemx 'banded positive definite'\n\ Banded matrix with the band size of @var{nl} below the diagonal and @var{nu} above\n\ it. If @var{nl} and @var{nu} are 1, then the matrix is tridiagonal and treated\n\ -with specialized code. In addition the matrix can be marked as positive definite\n\ -(Sparse matrices only)\n\ +with specialized code. In addition the matrix can be marked as probably a\n\ +positive definite (Sparse matrices only)\n\ \n\ @item 'singular'\n\ The matrix is assumed to be singular and will be treated with a minimum norm solution\n\ @@ -97,6 +97,14 @@ matrix type will result in incorrect results from solutions of linear equations,\n\ and so it is entirely the responsibility of the user to correctly identify the\n\ matrix type.\n\ +\n\ +Also the test for positive definiteness is a low cost test for a hermitian\n\ +matrix with a real positive diagonal. This does not guarentee that the matrix\n\ +is positive definite, but only that it is a probable candidate. When such a\n\ +matrix is factorized, a Cholesky factorization is first attempted, and if\n\ +that fails the matrix is then treated with an LU factorization. Once the\n\ +matrix has been factorized, @code{matrix_type} will return the correct\n\ +classification of the matrix.\n\ @end deftypefn") { int nargin = args.length ();