


bpdq_proj_lpball_mex : Projection onto Lp ball via Newton's method [x_out,n] = bpdq_proj_lpball_mex(y_in,c,r,p) This function computes the projection of y_in onto the lp ball, ie solves x_out = argmin ||x-y_in|| s.t. ||x-c||_p <= r Algorithm proceeds by multivariate Newton's method applied to find the zeros of the N+1 dimensional nonlinear equation F(z)=0 arising from lagrange multiplier condition for the constrained optimization problem. Algorithm should not be used for p<2 as Jacobian entries contain z_k^(p-2) ... Inputs : y_in - input vector, to be projected c - center of Lp ball r - radius of Lp ball p - exponent for Lp ball Outputs: x_out - computed projection n - number of iterations Routine is implemented as a mex file. For a more detailed explanation of the algorithm, see also the matlab implementation bpdq_proj_lpball.m This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer) Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with this library) (See the notice at the end of the file.)


0001 % bpdq_proj_lpball_mex : Projection onto Lp ball via Newton's method 0002 % 0003 % [x_out,n] = bpdq_proj_lpball_mex(y_in,c,r,p) 0004 % 0005 % This function computes the projection of y_in onto the lp ball, ie 0006 % solves 0007 % 0008 % x_out = argmin ||x-y_in|| s.t. ||x-c||_p <= r 0009 % 0010 % Algorithm proceeds by multivariate Newton's method applied to 0011 % find the zeros of the N+1 dimensional nonlinear equation F(z)=0 0012 % arising from lagrange multiplier condition for the constrained 0013 % optimization problem. 0014 % 0015 % Algorithm should not be used for p<2 as Jacobian entries contain 0016 % z_k^(p-2) ... 0017 % 0018 % Inputs : 0019 % y_in - input vector, to be projected 0020 % c - center of Lp ball 0021 % r - radius of Lp ball 0022 % p - exponent for Lp ball 0023 % 0024 % Outputs: 0025 % x_out - computed projection 0026 % n - number of iterations 0027 % 0028 % Routine is implemented as a mex file. 0029 % For a more detailed explanation of the algorithm, see also the 0030 % matlab implementation bpdq_proj_lpball.m 0031 % 0032 % This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer) 0033 % Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with 0034 % this library) (See the notice at the end of the file.) 0035 0036 % The BPDQ Toolbox is free software: you can redistribute it and/or modify 0037 % it under the terms of the GNU General Public License as published by 0038 % the Free Software Foundation, either version 3 of the License, or 0039 % (at your option) any later version. 0040 % 0041 % The BPDQ Toolbox is distributed in the hope that it will be useful, 0042 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0043 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0044 % GNU General Public License for more details. 0045 % 0046 % You should have received a copy of the GNU General Public License 0047 % along with The BPDQ Toolbox. If not, see <http://www.gnu.org/licenses/>.