Mercurial > hg > octave-lojdl
changeset 10200:7c1b1c084af1
handle cholesky update failure in pqpnonneg
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 26 Jan 2010 09:48:07 +0100 |
parents | 956eab916c86 |
children | 5c66978f3fdf |
files | scripts/ChangeLog scripts/optimization/pqpnonneg.m |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-01-26 Jaroslav Hajek <highegg@gmail.com> + + * optimization/pqpnonneg.m: If Cholesky update failed, switch off + updating but continue. + 2010-01-26 Jaroslav Hajek <highegg@gmail.com> * pkg/pkg.m: More complement -> setdiff changes.
--- a/scripts/optimization/pqpnonneg.m +++ b/scripts/optimization/pqpnonneg.m @@ -165,7 +165,11 @@ p = [p(1:jdx-1), zidx, p(jdx:end)]; if (usechol) ## insert the column into the Cholesky factorization. - r = cholinsert (r, jdx, c(p,zidx)); + [r, bad] = cholinsert (r, jdx, c(p,zidx)); + if (bad) + ## If the insertion failed, we switch off updates and go on. + usechol = false; + endif endif endwhile