Mercurial > hg > octave-terminal
changeset 3244:7f8827f4040a
[project @ 1999-05-29 14:01:55 by jwe]
author | jwe |
---|---|
date | Sat, 29 May 1999 14:02:16 +0000 |
parents | dd00769643ae |
children | 2270329efd14 |
files | src/ChangeLog src/DLD-FUNCTIONS/chol.cc |
diffstat | 2 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Fri May 28 11:02:37 1999 John W. Eaton <jwe@bevo.che.wisc.edu> + + * DLD-FUNCTIONS/chol.cc (Fchol): If two output arguments, never + produce error message. + Thu May 27 18:28:35 1999 John W. Eaton <jwe@bevo.che.wisc.edu> * DLD-FUNCTIONS/chol.cc (Fchol): Also return info as second output.
--- a/src/DLD-FUNCTIONS/chol.cc +++ b/src/DLD-FUNCTIONS/chol.cc @@ -66,13 +66,13 @@ { int info; CHOL fact (m, info); - if (info != 0) - error ("chol: matrix not positive definite"); - else + if (nargout == 2 || info == 0) { retval(1) = static_cast<double> (info); retval(0) = fact.chol_matrix (); } + else + error ("chol: matrix not positive definite"); } } else if (arg.is_complex_type ()) @@ -83,13 +83,13 @@ { int info; ComplexCHOL fact (m, info); - if (info != 0) - error ("chol: matrix not positive definite"); - else + if (nargout == 2 || info == 0) { retval(1) = static_cast<double> (info); retval(0) = fact.chol_matrix (); } + else + error ("chol: matrix not positive definite"); } } else