Mercurial > hg > octave-avbm
changeset 7729:6f2b2cc4b957
__qp__.cc: avoid bounds error when removing constraint from active set
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 23 Apr 2008 16:39:40 -0400 |
parents | 13820b9f5fd9 |
children | b68e44c90afe |
files | src/ChangeLog src/DLD-FUNCTIONS/__qp__.cc |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-04-23 John W. Eaton <jwe@octave.org> + * DLD-FUNCTIONS/__qp__.cc (qp): Avoid bounds error when removing + constraint from active set. + * lex.l (text_yyinput): New function. Use it in place of yyinput. (next_token_is_sep_op, scan_for_comments, eat_whitespace, have_continuation): No need to check for CR or CRLF.
--- a/src/DLD-FUNCTIONS/__qp__.cc +++ b/src/DLD-FUNCTIONS/__qp__.cc @@ -357,6 +357,7 @@ // At least one multiplier is negative, we // remove it from the set. + n_act--; for (octave_idx_type i = which_eig; i < n_act - n_eq; i++) { Wact(i) = Wact(i+1); @@ -364,7 +365,6 @@ Aact(n_eq+i,j) = Aact(n_eq+i+1,j); bact(n_eq+i) = bact(n_eq+i+1); } - n_act--; // Resizing the active set. Wact.resize (n_act-n_eq);