Navigation

Operators and Keywords

Function List:

C++ API

pqpnonneg.m File Reference


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

Function Documentation

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 (  ) 

while (  ) 

if (isempty (idx)) x( x (  ) 

xx (  ) 


Variable Documentation

alpha = min (sf)

else break

continue

function[x, minval, exitflag, output, lambda]

Initial value:

 pqpnonneg (c, d, x = [], options = struct ())

  if (nargin == 1 && ischar (c) && strcmp (c, 'defaults'))
    x = optimset ("MaxIter", 1e5)

endif endif idx = find (xtmp < 0)

iter = 0

endif m = rows (c)

endif max_iter = optimget (options, "MaxIter", 1e5)

n = columns (c)

p = find (x > 0).'

else pidx = p(idx)

r = chol (c(p, p))

sf = x(pidx)./(x(pidx) - xtmp(idx))

usechol = true

endif endif endwhile w = -(d + c*x)

else x = max (x, 0)

else xtmp = -(c(p,p) \ d(p))

xx = zeros (n, 1)