Skip to content

Commit 9ec8deb

Browse files
author
Nathanael Perraudin
committed
version 1.7.3
1 parent 416cee8 commit 9ec8deb

File tree

7 files changed

+30
-25
lines changed

7 files changed

+30
-25
lines changed

demos/demo_fbb_primal_dual.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%DEMO_FBB_PRIMAL_DUAL Example of use of the forward backward based primal dual solver
1+
%DEMO_FBB_PRIMAL_DUAL Example of use of the forward backward based primal dual solver
22
%
33
% We present an example of the the forward backward based primal dual
44
% solver through an image de-noising, in-painting problem. We express the
@@ -20,7 +20,7 @@
2020
%
2121
% Results
2222
%
23-
%
23+
%
2424
%
2525
% References: komodakis2014playing
2626

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

102102
%% Closing the toolbox
103103
close_unlocbox();

mat2doc/ignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
demo_lrjs
22
solve_lrjs
3-
solver
3+
solver
4+
squareform
5+
pdist

test_bench/test_solvers.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,15 +1390,14 @@
13901390
f21.prox = @(x,T) prox_l1(x,T,paraml11);
13911391
f21.L = A;
13921392
f21.Lt = At;
1393-
f21.norm_L = 1;
1393+
f21.norm_L = norm(Mat)^2;
13941394

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

13991399
param.tol = 100*eps;
14001400
param.verbose = 1;
1401-
param.gamma = 0.1;
14021401
param.maxit = 1000;
14031402

14041403
paramb2.verbose = 0;

unlocbox_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.7.2
1+
1.7.3

utils/Contents.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
% vec - Vectorize
3232
% svdecon - Acceleleration of svd
3333
% svdsecon - Acceleleration of svds
34+
% sum_squareform - Sparse matrix that sums the squareform of a vector
35+
% squareform_sp - Sparse counterpart of matlab's squareform
3436
%
3537
% For help, bug reports, suggestions etc. please send email to
3638
% unlocbox (at) groupes (dot) epfl (dot) ch

utils/squareform_sp.m

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@
1010
% W: matrix form of input vector w OR
1111
% w: vector form of input matrix W
1212
%
13-
%
1413
% This function is to be used instead of squareform.m when the matrix W
1514
% or the vector w is sparse. For large scale computations, e.g. for
1615
% learning the graph structure of a big graph it is necessary to take
1716
% into account the sparsity.
1817
%
1918
% Example:::
2019
%
21-
% B = sprand(8, 8, 0.1);
22-
% B = B+B';
23-
% B(1:9:end) = 0;
24-
% b = squareform_sp(B);
25-
% Bs = squareform_sp(b);
20+
% B = sprand(8, 8, 0.1);
21+
% B = B+B';
22+
% B(1:9:end) = 0;
23+
% b = squareform_sp(B);
24+
% Bs = squareform_sp(b);
2625
%
2726
% See also: squareform sum_squareform pdist
2827

@@ -99,3 +98,5 @@
9998
new_ind = ind_j + (ind_i-1)*n - ind_i.*(ind_i+1)/2;
10099
w = sparse(new_ind, 1, s, n*(n-1)/2, 1);
101100
end
101+
102+
end

utils/sum_squareform.m

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function [S, St] = sum_squareform(n, mask)
2-
%SUM_SQUAREFORM: sparse matrix that sums the squareform of a vector
2+
%SUM_SQUAREFORM sparse matrix that sums the squareform of a vector
33
% Usage: [S, St] = sum_squareform(n)
44
% [S, St] = sum_squareform(n, mask)
55
%
@@ -25,17 +25,16 @@
2525
% * sum(S) = 2*ones(1, n*(n-1)/2)
2626
% * sum(St) = sum(squareform(mask)) -- for full mask = (n-1)*ones(n,1)
2727
%
28+
% Example::
29+
% % if mask is given, the resulting S are the ones we would get with the
30+
% % following operations (but memory efficiently):
31+
% [S, St] = sum_squareform(n);
32+
% [ind_i, ~, w] = find(mask(:));
33+
% % get rid of the columns of S corresponding to zeros in the mask
34+
% S = S(:, ind_i);
35+
% St = St(ind_i, :);
2836
%
29-
% Example:
30-
% % if mask is given, the resulting S are the ones we would get with the
31-
% % following operations (but memory efficiently):
32-
% [S, St] = sum_squareform(n);
33-
% [ind_i, ~, w] = find(mask(:));
34-
% % get rid of the columns of S corresponding to zeros in the mask
35-
% S = S(:, ind_i);
36-
% St = St(ind_i, :);
37-
%
38-
% See also squareform_sp
37+
% See also: squareform_sp
3938
%
4039

4140
%
@@ -119,3 +118,5 @@
119118

120119
St = sparse([1:ncols, 1:ncols], [I, J], 1, ncols, n);
121120
S = St';
121+
122+
end

0 commit comments

Comments
 (0)