Functions | |
return endif | if (!(nargin >=2 &&nargin<=4 &&ismatrix(c)&&ismatrix(d)&&isstruct(options))) print_usage() |
if (m!=n) error("matrix must be square") | |
endif | if (isempty(x)) x |
while (iter< max_iter) while(iter< max_iter) iter++ | |
if (usechol) xtmp | |
if(isempty(idx)) x( | x (p) |
xx (p) | |
p (idx) | |
w (p) | |
if (!any(w > 0)) if(usechol) usechol | |
Variables | |
function [x, minval, exitflag, output, lambda] | |
endif | m = rows (c) |
n = columns (c) | |
else | x = max (x, 0) |
endif | max_iter = optimget (options, "MaxIter", 1e5) |
p = find (x > 0).' | |
r = chol (c(p, p)) | |
usechol = true | |
iter = 0 | |
else | xtmp = -(c(p,p) \ d(p)) |
endif | idx = find (xtmp < 0) |
break | |
else | pidx = p(idx) |
sf = x(pidx)./(x(pidx) - xtmp(idx)) | |
alpha = min (sf) | |
xx = zeros (n, 1) | |
endif endif endwhile | w = -(d + c*x) |
continue |
if | ( | ! | anyw > 0 | ) |
if | ( | usechol | ) |
endif if | ( | isempty(x) | ) |
if | ( | m! | = n |
) |
return endif if | ( | ! | nargin >=2 &&nargin<=4 &&ismatrix(c)&&ismatrix(d)&&isstruct(options) | ) |
p | ( | idx | ) |
w | ( | p | ) |
while | ( | ) |
if (isempty (idx)) x( x | ( | p | ) |
xx | ( | p | ) |
else break |
continue |
iter = 0 |
endif m = rows (c) |
n = columns (c) |
p = find (x > 0).' |
r = chol (c(p, p)) |
usechol = true |
else x = max (x, 0) |
xx = zeros (n, 1) |