changeset 11879:57c9b3f2b822 release-3-0-x

__qp__.cc fix
author John W. Eaton <jwe@octave.org>
date Fri, 31 Oct 2008 07:52:55 +0100
parents 2415586d0f5a
children 7b69c809e0d4
files src/ChangeLog src/DLD-FUNCTIONS/__qp__.cc
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-17  John W. Eaton  <jwe@octave.org>
+
+	* DLD-FUNCTIONS/__qp__.cc (qp): Undo part of change from
+	2007-09-04 (compute Y at each iteration).
+
 2008-10-02  John W. Eaton  <jwe@octave.org>
 
 	* pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
--- a/src/DLD-FUNCTIONS/__qp__.cc
+++ b/src/DLD-FUNCTIONS/__qp__.cc
@@ -233,6 +233,9 @@
 	  // FIXME -- still remain to handle the case of
 	  // non-full rank active set matrix.
 
+	  // Computing the Y matrix (orthogonal to Z)
+	  Y = Aact.pseudo_inverse ();
+
 	  // Reduced Hessian
 	  Matrix Zt = Z.transpose ();
 	  Matrix rH = Zt * H * Z;
@@ -327,7 +330,6 @@
 	      // Computing the multipliers only for the inequality
 	      // constraints that are active.  We do NOT compute
 	      // multipliers for the equality constraints.
- 	      Y = Aact.pseudo_inverse ();
 	      Matrix Yt = Y.transpose ();
 	      Yt = Yt.extract_n (n_eq, 0, n_act-n_eq, n);
 	      lambda_tmp = Yt * (g + H * p);