Skip to content

Commit

Permalink
version 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathanael Perraudin committed Mar 8, 2016
1 parent 416cee8 commit 9ec8deb
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 25 deletions.
8 changes: 4 additions & 4 deletions demos/demo_fbb_primal_dual.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%DEMO_FBB_PRIMAL_DUAL Example of use of the forward backward based primal dual solver
%DEMO_FBB_PRIMAL_DUAL Example of use of the forward backward based primal dual solver
%
% We present an example of the the forward backward based primal dual
% solver through an image de-noising, in-painting problem. We express the
Expand All @@ -20,7 +20,7 @@
%
% Results
%
%
%
%
% References: komodakis2014playing

Expand Down Expand Up @@ -96,8 +96,8 @@
imagesc_gray(noisy_img, 1, '(b) Noisy image',222,[0 1]);
imagesc_gray(b, 1, '(c) Measurements',223,[0 1]);
imagesc_gray(sol, 1, '(d) Solution of optimization',224,[0 1]);
paramplot.position = [100 100 500 500];
gsp_plotfig('inpainting_fbb_primal_dual',paramplot);
%paramplot.position = [100 100 500 500];
%gsp_plotfig('inpainting_fbb_primal_dual',paramplot);

%% Closing the toolbox
close_unlocbox();
Expand Down
4 changes: 3 additions & 1 deletion mat2doc/ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
demo_lrjs
solve_lrjs
solver
solver
squareform
pdist
3 changes: 1 addition & 2 deletions test_bench/test_solvers.m
Original file line number Diff line number Diff line change
Expand Up @@ -1390,15 +1390,14 @@
f21.prox = @(x,T) prox_l1(x,T,paraml11);
f21.L = A;
f21.Lt = At;
f21.norm_L = 1;
f21.norm_L = norm(Mat)^2;

paraml12.verbose = 0;
f22.eval = @(x) norm(x,1);
f22.prox = @(x,T) prox_l1(x,T,paraml12);

param.tol = 100*eps;
param.verbose = 1;
param.gamma = 0.1;
param.maxit = 1000;

paramb2.verbose = 0;
Expand Down
2 changes: 1 addition & 1 deletion unlocbox_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.2
1.7.3
2 changes: 2 additions & 0 deletions utils/Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
% vec - Vectorize
% svdecon - Acceleleration of svd
% svdsecon - Acceleleration of svds
% sum_squareform - Sparse matrix that sums the squareform of a vector
% squareform_sp - Sparse counterpart of matlab's squareform
%
% For help, bug reports, suggestions etc. please send email to
% unlocbox (at) groupes (dot) epfl (dot) ch
Expand Down
13 changes: 7 additions & 6 deletions utils/squareform_sp.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@
% W: matrix form of input vector w OR
% w: vector form of input matrix W
%
%
% This function is to be used instead of squareform.m when the matrix W
% or the vector w is sparse. For large scale computations, e.g. for
% learning the graph structure of a big graph it is necessary to take
% into account the sparsity.
%
% Example:::
%
% B = sprand(8, 8, 0.1);
% B = B+B';
% B(1:9:end) = 0;
% b = squareform_sp(B);
% Bs = squareform_sp(b);
% B = sprand(8, 8, 0.1);
% B = B+B';
% B(1:9:end) = 0;
% b = squareform_sp(B);
% Bs = squareform_sp(b);
%
% See also: squareform sum_squareform pdist

Expand Down Expand Up @@ -99,3 +98,5 @@
new_ind = ind_j + (ind_i-1)*n - ind_i.*(ind_i+1)/2;
w = sparse(new_ind, 1, s, n*(n-1)/2, 1);
end

end
23 changes: 12 additions & 11 deletions utils/sum_squareform.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function [S, St] = sum_squareform(n, mask)
%SUM_SQUAREFORM: sparse matrix that sums the squareform of a vector
%SUM_SQUAREFORM sparse matrix that sums the squareform of a vector
% Usage: [S, St] = sum_squareform(n)
% [S, St] = sum_squareform(n, mask)
%
Expand All @@ -25,17 +25,16 @@
% * sum(S) = 2*ones(1, n*(n-1)/2)
% * sum(St) = sum(squareform(mask)) -- for full mask = (n-1)*ones(n,1)
%
% Example::
% % if mask is given, the resulting S are the ones we would get with the
% % following operations (but memory efficiently):
% [S, St] = sum_squareform(n);
% [ind_i, ~, w] = find(mask(:));
% % get rid of the columns of S corresponding to zeros in the mask
% S = S(:, ind_i);
% St = St(ind_i, :);
%
% Example:
% % if mask is given, the resulting S are the ones we would get with the
% % following operations (but memory efficiently):
% [S, St] = sum_squareform(n);
% [ind_i, ~, w] = find(mask(:));
% % get rid of the columns of S corresponding to zeros in the mask
% S = S(:, ind_i);
% St = St(ind_i, :);
%
% See also squareform_sp
% See also: squareform_sp
%

%
Expand Down Expand Up @@ -119,3 +118,5 @@

St = sparse([1:ncols, 1:ncols], [I, J], 1, ncols, n);
S = St';

end

0 comments on commit 9ec8deb

Please sign in to comment.