Home > dal > stopcond_fval.m

stopcond_fval

PURPOSE ^

stopcond_fval - objective value stopping condition

SYNOPSIS ^

function [ret, fval, spec, res]=stopcond_fval(ww, uu, aa, tol, prob,A, B, lambda);

DESCRIPTION ^

 stopcond_fval - objective value stopping condition 

 Copyright(c) 2009 Ryota Tomioka
 This software is distributed under the MIT license. See license.txt

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % stopcond_fval - objective value stopping condition
0002 %
0003 % Copyright(c) 2009 Ryota Tomioka
0004 % This software is distributed under the MIT license. See license.txt
0005 
0006 function [ret, fval, spec, res]=stopcond_fval(ww, uu, aa, tol, prob, ...
0007                                               A, B, lambda);
0008 fnc=prob.floss;
0009 %% Evaluate primal loss
0010 
0011 if ~isempty(uu)
0012   zz=A*ww+B*uu;
0013 else
0014   zz=A*ww;
0015 end
0016 
0017 [fl, gg] =feval(fnc.p, zz, fnc.args{:});
0018 spec=fevals(prob.fspec,ww);
0019 fval = fl+lambda*sum(spec);
0020 
0021 res  = fval-tol;
0022 ret  = res<=0;

Generated on Sat 22-Aug-2009 22:15:36 by m2html © 2003