# HG changeset patch # User David Bateman # Date 1204829176 18000 # Node ID 6b07c15eb8e1e74b5d5cdcf00e91e8e13d81e950 # Parent b3acdf1c41a52562b0f878e9c25339c95f4aaebc Document positive definite behavior of matrix_type diff -r b3acdf1c41a5 -r 6b07c15eb8e1 src/ChangeLog --- a/src/ChangeLog Thu Mar 06 13:42:08 2008 -0500 +++ b/src/ChangeLog Thu Mar 06 13:46:16 2008 -0500 @@ -1,3 +1,10 @@ +2008-03-06 David Bateman + + * 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 * parse.y: Move tests here from test/test_eval.m. diff -r b3acdf1c41a5 -r 6b07c15eb8e1 src/DLD-FUNCTIONS/matrix_type.cc --- a/src/DLD-FUNCTIONS/matrix_type.cc Thu Mar 06 13:42:08 2008 -0500 +++ b/src/DLD-FUNCTIONS/matrix_type.cc Thu Mar 06 13:46:16 2008 -0500 @@ -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 ();