Mercurial > hg > octave-lyh
comparison src/qpsol.cc @ 156:8dc079be9dc5
[project @ 1993-10-13 20:27:26 by jwe]
(qpsol): Don't try to create the linear constraint object before
checking array sizes. Wouldn't exception handling be nice?
author | jwe |
---|---|
date | Wed, 13 Oct 1993 20:27:26 +0000 |
parents | d68036bcad4c |
children | 94aa0774c417 |
comparison
equal
deleted
inserted
replaced
155:d46c6323a190 | 156:8dc079be9dc5 |
---|---|
140 { | 140 { |
141 ColumnVector lub = args[nargin-1].to_vector (); | 141 ColumnVector lub = args[nargin-1].to_vector (); |
142 Matrix A = args[nargin-2].to_matrix (); | 142 Matrix A = args[nargin-2].to_matrix (); |
143 ColumnVector llb = args[nargin-3].to_vector (); | 143 ColumnVector llb = args[nargin-3].to_vector (); |
144 | 144 |
145 LinConst linear_constraints (llb, A, lub); | |
146 | |
147 if (! linear_constraints_ok (x, llb, A, lub, "qpsol", 1)) | 145 if (! linear_constraints_ok (x, llb, A, lub, "qpsol", 1)) |
148 return retval; | 146 return retval; |
147 | |
148 LinConst linear_constraints (llb, A, lub); | |
149 | 149 |
150 if (nargin == 9) | 150 if (nargin == 9) |
151 { | 151 { |
152 // 3. qpsol (x, H, c, lb, ub, llb, A, lub) | 152 // 3. qpsol (x, H, c, lb, ub, llb, A, lub) |
153 | 153 |