Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9adbf6eb authored by hhakim's avatar hhakim
Browse files

Add matfaust.factparams.ParamsPalm4msaWHT (same as the one added for pyfaust by 7add1321).

parent e4627a9a
No related branches found
No related tags found
No related merge requests found
Pipeline #834065 skipped
......@@ -31,7 +31,7 @@ if(BUILD_DOCUMENTATION)
string(CONCAT DOXYGEN_FILE_PATTERNS "*.cpp *.hpp *.h *.cu *.hu")
endif()
if(BUILD_WRAPPER_MATLAB)
string(CONCAT DOXYGEN_FILE_PATTERNS ${DOXYGEN_FILE_PATTERNS} " Faust.m FaustMulMode.m StoppingCriterion.m ConstraintGeneric.m ConstraintMat.m ConstraintReal.m ConstraintInt.m ConstraintName.m ParamsFact.m ParamsHierarchical.m ParamsPalm4MSA.m FaustFactory.m hadamard.m quickstart.m fft.m bsl.m runtimecmp.m runall.m version.m faust_fact.m ParamsHierarchicalSquareMat.m ParamsHierarchicalRectMat.m license.m omp.m wht.m dft.m eye.m rand.m rand_bsr.m eigtj.m hierarchical.m fact.m palm4msa.m fgft_givens.m fgft_palm.m svdtj.m splin.m spcol.m proj_gen.m sp.m const.m supp.m hankel.m toeplitz.m circ.m normcol.m normlin.m splincol.m blockdiag.m skperm.m enable_gpu_mod.m isFaust.m poly.m basis.m next.m expm_multiply.m FaustPoly.m MHTPParams.m palm4msa_mhtp.m hierarchical_mhtp.m butterfly.m ParamsHierarchicalDFT.m create_bsr.m ") # warning: the space on the end matters
string(CONCAT DOXYGEN_FILE_PATTERNS ${DOXYGEN_FILE_PATTERNS} " Faust.m FaustMulMode.m StoppingCriterion.m ConstraintGeneric.m ConstraintMat.m ConstraintReal.m ConstraintInt.m ConstraintName.m ParamsFact.m ParamsHierarchical.m ParamsPalm4MSA.m FaustFactory.m hadamard.m quickstart.m fft.m bsl.m runtimecmp.m runall.m version.m faust_fact.m ParamsHierarchicalSquareMat.m ParamsHierarchicalRectMat.m license.m omp.m wht.m dft.m eye.m rand.m rand_bsr.m eigtj.m hierarchical.m fact.m palm4msa.m fgft_givens.m fgft_palm.m svdtj.m splin.m spcol.m proj_gen.m sp.m const.m supp.m hankel.m toeplitz.m circ.m normcol.m normlin.m splincol.m blockdiag.m skperm.m enable_gpu_mod.m isFaust.m poly.m basis.m next.m expm_multiply.m FaustPoly.m MHTPParams.m palm4msa_mhtp.m hierarchical_mhtp.m butterfly.m ParamsHierarchicalDFT.m create_bsr.m ParamsPalm4msaWHT.m ") # warning: the space on the end matters
endif()
if(BUILD_WRAPPER_PYTHON)
string(CONCAT DOXYGEN_FILE_PATTERNS ${DOXYGEN_FILE_PATTERNS} "__init__.py factparams.py demo.py tools.py fact.py proj.py poly.py")
......
......@@ -32,6 +32,7 @@
%> - FACTOR 1 (real) DENSE, size 32x32, density 1, nnz 1024
%>
%>
%> See also matfaust.factparams.ParamsPalm4msaWHT to factorize a Hadamard matrix using the SKPERM projector.
%==========================================================================================
function [F,lambda] = palm4msa(M, p, varargin)
import matfaust.Faust
......
% ==========================================================
%> @brief This class is a simple parameterization of PALM4MSA to factorize a Hadamard
%> matrix using the matfaust.proj.skperm proximity operator.
%>
%> @b Examples
%>
%> @code
%> import matfaust.factparams.ParamsPalm4msaWHT
%> import matfaust.fact.palm4msa
%> import matfaust.wht
%> d = 128;
%> H = full(wht(d));
%> p = ParamsPalm4msaWHT(d);
%> F = palm4msa(H, p);
%> err = norm(full(F)-H)/norm(H) % should be about 1e-16
%> @endcode
%>
%> Reference:
%> [1] Quoc-Tung Le, Rémi Gribonval. Structured Support Exploration For
%> Multilayer Sparse Matrix Fac- torization. ICASSP 2021 - IEEE International
%> Conference on Acoustics, Speech and Signal Processing, Jun 2021, Toronto,
%> Ontario, Canada. pp.1-5 <a href="https://hal.inria.fr/hal-03132013/document">hal-03132013</a>.
%>
%> See also matfaust.fact.palm4msa
%>
%>
% ==========================================================
classdef ParamsPalm4msaWHT < matfaust.factparams.ParamsPalm4MSA
properties
end
methods
% =========================================================
%>
%> @brief Constructor.
%>
% ==========================================================
function p = ParamsPalm4msaWHT(matrix_size, varargin)
import matfaust.factparams.*
import matfaust.proj.skperm
fac_projs = {}
n = log2(matrix_size)
for i=1:n
fac_projs = {fac_projs{:}, skperm([matrix_size, matrix_size], 2, 'normalized', false, 'pos', false)}
end
stop_crit = StoppingCriterion(30)
p = p@matfaust.factparams.ParamsPalm4MSA(fac_projs, stop_crit, 'is_update_way_R2L', false, 'packing_RL', false, varargin{:});
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment