# HG changeset patch # User Jaroslav Hajek # Date 1264495687 -3600 # Node ID 7c1b1c084af1aa0a95d8ca30c68e4f8ee0a880af # Parent 956eab916c866d9e7edab228a8bff1046c0ca2ad handle cholesky update failure in pqpnonneg diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-01-26 Jaroslav Hajek + + * optimization/pqpnonneg.m: If Cholesky update failed, switch off + updating but continue. + 2010-01-26 Jaroslav Hajek * pkg/pkg.m: More complement -> setdiff changes. diff --git a/scripts/optimization/pqpnonneg.m b/scripts/optimization/pqpnonneg.m --- 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