# HG changeset patch # User John W. Eaton # Date 1208983915 14400 # Node ID 8e6dc8dd94e742a07ce5af18c0347877c9b1f092 # Parent 6a8fd365eebd29ace49c6c86f1be67471467d087 __qp__.cc: avoid bounds error when removing constraint from active set diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-23 John W. Eaton + + * DLD-FUNCTIONS/__qp__.cc (qp): Avoid bounds error when removing + constraint from active set. + 2008-04-21 John W. Eaton Version 3.0.1 released. diff --git a/src/DLD-FUNCTIONS/__qp__.cc b/src/DLD-FUNCTIONS/__qp__.cc --- a/src/DLD-FUNCTIONS/__qp__.cc +++ b/src/DLD-FUNCTIONS/__qp__.cc @@ -355,6 +355,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); @@ -362,7 +363,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);