Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5a11171e authored by Nicolas Bellot's avatar Nicolas Bellot Committed by hhakim
Browse files

header demo matlab folder tools

parent 2515e41a
No related branches found
No related tags found
No related merge requests found
function [Ddvp, cum_dvp] = cum_dvp(D)
%dvp. Development of the input factorized matrix.
% Ddvp = dvp(D) develops the cell-array of matrices D into the matrix Ddvp
% which is the product of the matrices contained in D:
% Ddvp = D{1}*D{2}*...*D{n}.
%
% References:
% [1] Le Magoarou L. and Gribonval R., "Learning computationally efficient
% dictionaries and their implementation as fast transforms", submitted to
% NIPS 2014
% Luc Le Magoarou
% PANAMA team
% Inria, Rennes - Bretagne Atlantique
% luc.le-magoarou@inria.fr
%
% June 2014
Nlayers = size(D,2);
cum_dvp=cell(1,Nlayers);
if Nlayers==0
Ddvp = 1;
else
cum_dvp{1} =D{1};
for i = 2:Nlayers
if size(D{i},1) == size(cum_dvp{i-1},2)
cum_dvp{i} = cum_dvp{i-1} * D{i};
end
end
Ddvp=cum_dvp{1,Nlayers};
end
end
function y = f_mult(facts,x)
% y=ones(size(facts{1},2),size(x,2));
% disp('bla');
% for i=1:100
% end
y=x;
for i=length(facts):-1:1
y=facts{i}*y;
end
if issparse(y)
y=full(y);
end
end
function facts_transpose = faust_transpose(facts)
facts_transpose=cell(1,length(facts));
for i=1:length(facts);
% length(facts)+1-i
facts_transpose{i}=facts{length(facts)+1-i}';
end
end
%% script pour generer des Faust avec un RCG, une Dimension et un nombre de facteur fixe
% lancer l'executable multiply_comptime ensuite pour effectuer les tests de performances
% puis display_multiply_comptime pour afficher les resultats
%% Description gen_artficial_faust
% facts=gen_artficial_faust(Dim,RCG,nb_fact,constraint)
% create a random Faust factor with :
% a given dimension Dim,
% a relative complexity gain RCG,
% a number of factor nb_fact,
% a type of sparsity 'sp' random support,
% 'sp_row', fixed number of non-zeros per row
% 'sp_col', fixed number of nonzeros-per-col
%
% For more information on the FAuST Project, please visit the website of
% the project : <http://faust.gforge.inria.fr>
%
%% License:
% Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais,
% Luc Le Magoarou, Remi Gribonval
% INRIA Rennes, FRANCE
% http://www.inria.fr/
%
% The FAuST Toolbox is distributed under the terms of the GNU Affero
% General Public License.
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU Affero General Public License as published
% by the Free Software Foundation.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% See the GNU Affero General Public License for more details.
%
% You should have received a copy of the GNU Affero General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%% Contacts:
% Nicolas Bellot : nicolas.bellot@inria.fr
% Adrien Leman : adrien.leman@inria.fr
% Thomas Gautrais : thomas.gautrais@inria.fr
% Luc Le Magoarou : luc.le-magoarou@inria.fr
% Remi Gribonval : remi.gribonval@inria.fr
%
%% References:
% [1] Le Magoarou L. and Gribonval R., "Flexible multi-layer sparse
% approximations of matrices and applications", Journal of Selected
% Topics in Signal Processing, 2016.
% <https://hal.archives-ouvertes.fr/hal-01167948v1>
%%
function facts=gen_artficial_faust(Dim,RCG,nb_fact,constraint)
%% cas 1
% RCGs = [2 4 6 8 10];
......
......@@ -7,7 +7,8 @@
% the project : <http://faust.gforge.inria.fr>
%
%% License:
% Copyright (2016): Luc Le Magoarou, Remi Gribonval
% Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais,
% Luc Le Magoarou, Remi Gribonval
% INRIA Rennes, FRANCE
% http://www.inria.fr/
%
......@@ -26,17 +27,17 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%% Contacts:
% Nicolas Bellot : nicolas.bellot@inria.fr
% Adrien Leman : adrien.leman@inria.fr
% Luc Le Magoarou: luc.le-magoarou@inria.fr
% Remi Gribonval : remi.gribonval@inria.fr
% Nicolas Bellot : nicolas.bellot@inria.fr
% Adrien Leman : adrien.leman@inria.fr
% Thomas Gautrais : thomas.gautrais@inria.fr
% Luc Le Magoarou : luc.le-magoarou@inria.fr
% Remi Gribonval : remi.gribonval@inria.fr
%
%% References:
% [1] Le Magoarou L. and Gribonval R., "Flexible multi-layer sparse
% approximations of matrices and applications", Journal of Selected
% Topics in Signal Processing, 2016.
% <https://hal.archives-ouvertes.fr/hal-01167948v1>
%%
function [H,Fact] = hadamard_mat(M)
......
function new_facts = make_sparse(facts)
%UNTITLED9 Summary of this function goes here
% Detailed explanation goes here
for i=1:length(facts)
new_facts{i}=sparse(facts{i});
end
end
%% Description normalizeCol
% A_normalize = normalizeCol(A,varargin)
% each column of the ouput matrix is normalized (norm(A_normalize(:,i))=1)
% - A can be a matrix or cell-array representing a matrix
% - an optional scalar multiplicator can added in input
%
% For more information on the FAuST Project, please visit the website of
% the project : <http://faust.gforge.inria.fr>
%
%% License:
% Copyright (2016): Nicolas Bellot, Adrien Leman, Thomas Gautrais,
% Luc Le Magoarou, Remi Gribonval
% INRIA Rennes, FRANCE
% http://www.inria.fr/
%
% The FAuST Toolbox is distributed under the terms of the GNU Affero
% General Public License.
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU Affero General Public License as published
% by the Free Software Foundation.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% See the GNU Affero General Public License for more details.
%
% You should have received a copy of the GNU Affero General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%% Contacts:
% Nicolas Bellot : nicolas.bellot@inria.fr
% Adrien Leman : adrien.leman@inria.fr
% Thomas Gautrais : thomas.gautrais@inria.fr
% Luc Le Magoarou : luc.le-magoarou@inria.fr
% Remi Gribonval : remi.gribonval@inria.fr
%
%% References:
% [1] Le Magoarou L. and Gribonval R., "Flexible multi-layer sparse
% approximations of matrices and applications", Journal of Selected
% Topics in Signal Processing, 2016.
% <https://hal.archives-ouvertes.fr/hal-01167948v1>
%%
function A_normalize = normalizeCol(A,varargin)
nb_input=length(varargin);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment