Mentions légales du service

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

documentation mexfunction

parent 1890e6fa
Branches
Tags
No related merge requests found
......@@ -183,11 +183,13 @@ if (FAUST_USE_MEX)
set(FAUST_MATLAB_SRC_DIR ${FAUST_WRAPPER_DIR}/matlab CACHE INTERNAL "")
set(FAUST_MATLABTOOLS_SRC_DIR ${FAUST_MATLAB_SRC_DIR}/tools CACHE INTERNAL "")
set(FAUST_MATLABMEX_SRC_DIR ${FAUST_MATLAB_SRC_DIR}/src CACHE INTERNAL "")
set(FAUST_MATLABDOC_SRC_DIR ${FAUST_MATLAB_SRC_DIR}/doc CACHE INTERNAL "")
###### WRAPPER MATLAB BINARY DIRECTORIES ######
# MEX function
set(FAUST_MATLAB_BIN_DIR ${FAUST_WRAPPER_BIN_DIR}/matlab CACHE INTERNAL "")
set(FAUST_MATLABMEX_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/mex CACHE INTERNAL "")
set(FAUST_MATLABTOOLS_BIN_DIR ${FAUST_MATLAB_BIN_DIR}/tools CACHE INTERNAL "")
endif(FAUST_USE_MEX)
......
......@@ -102,6 +102,8 @@ foreach(mex_target ${MEXFILE_TARGET_LIST})
else()
message(FATAL_ERROR "Unable to compile mex functions")
endif()
configure_file(${FAUST_MATLABDOC_SRC_DIR}/${mex_target}.m ${FAUST_MATLABMEX_BIN_DIR}/${mex_target}.m COPYONLY)
install(FILES ${FAUST_MATLABMEX_BIN_DIR}/${mex_target}.m DESTINATION ${FAUST_INSTALL_MEX})
install(FILES ${FAUST_MATLABMEX_BIN_DIR}/${mex_target}.${MEX_EXT} DESTINATION ${FAUST_INSTALL_MEX})
endforeach()
......
%% Description mexFaust
% this mexfunction should not be called directly by the user,
% all the call of this mexfunction is done by the matlab_faust.m class
%
% mexfunction handling all the method, function of the matlab_faust class
% arargout{1:nargout} = mexFaust(CMD,vargin{:}),
% for instance, 1st input CMD can be equal to :
% 'new'-> create a new faust
%'delete'-> delete a faust
%'multiply'-> multiply a faust by a matrix
%'get_product'-> evaluate the product of a faust
%'transpose' -> transpose a faust
%'size' -> get the dimension of a faust
%
% for more information about the matlab_faust class,
%type 'doc matlab_faust'
%% License:
% Copyright (2016): Nicolas Bellot, Adrien Leman, 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
% 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>
%%
\ No newline at end of file
%% Description mexHierarchical_fact
% Hierarchical matrix factorization.
% [lambda, facts, errors] = mexHierarchical_fact(params) runs the hierarchical
% matrix factorization algorithm (Algorithm 3 of [1])on the specified
% input matrix, returning the factors in "facts" (cell array of sparse matrices),
% the multiplicative scalar in "lambda" and the errors in "errors".
%
%
% Required fields in PARAMS:
% --------------------------
%
% 'data' - Training data.
% A matrix to hierarchically factorize.
%
% 'nfacts' - Number of factors.
% Specifies the desired number of factors.
%
% 'cons' - Constraint sets.
% Specifies the constraint sets in which eafaust_params_palm.ch factor should lie. It
% should be a cell-array of size 2*(nfacts-1), where the jth columns
% sets the constraints for the jth factorization in two factors:
% cons(1,j) specifies the constraints for the left factor and
% cons(2,j) for the right factor. cons(i,j) should be itself a
% cell-array of size 1*4 taking this form for a factor of size m*n:
% {'constraint name', 'constraint parameter', m, n}
%
%
% Optional fields in PARAMS:
% --------------------------
%
% 'niter1' - Number of iterations for the 2-factorisation.
% Specifies the desired number of iteration for the factorisations in
% 2 factors. The default value is 500.
%
% 'niter2' - Number of iterations for the global optimisation.
% Specifies the desired number of iteration for the global
% optimisation. The default value is 500.
%
% 'fact_side' - Side to be factorized iteratively: 1-the left or
% 0-the right. The default value is 0;
%
% 'verbose' - Verbosity of the function. if verbose=1, the function
% outputs the error at each iteration. if verbose=0, the function runs
% in silent mode. The default value is 0.
%
% 'update_way' - Way in which the factors are updated. If update_way = 1
% ,the factors are updated from right to left, and if update_way = 0,
% the factors are updated from left to right. The default value is 0.
%
% 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, 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
% 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>
%%
%% Description: mexPalm4MSA.
% Factorization of a data matrix into multiple factors using PALM.
% [lambda, facts] = mexPalm4MSA(params) runs the PALM algorithm on the
% specified set of signals (Algorithm 2 of [1]), returning the factors in
% "facts" and the multiplicative scalar in "lambda".
%
% Required fields in PARAMS:
% --------------------------
%
% 'data' - Training data.
% A matrix containing the training signals as its columns.
%
% 'nfacts' - Number of factors.
% Specifies the desired number of factors.
%
% 'cons' - Constraint sets.
% Specifies the constraint sets in which each factor should lie. It
% should be a cell-array of size 1*nfacts, where the jth column sets
% the constraints for the jth factor (starting from the left). cons(j)
% should be itself a cell-array of size 1*4 taking this form for a
% factor of size m*n:
% {'constraint name', 'constraint parameter', m, n}
%
% 'niter' - Number of iterations.
% Specifies the number of iterations to run.
%
% 'init_facts' - Initialization of "facts".
% Specifies a starting point for the algorithm.
%
% Optional fields in PARAMS:
% --------------------------
%
% 'init_lambda' - Initialization of "lambda".
% Specifies a starting point for the algorithm. The default value is 1
%
% 'verbose' - Verbosity of the function. if verbose=1, the function
% outputs the error at each iteration. if verbose=0, the function runs
% in silent mode. The default value is 0.
%
% 'update_way' - Way in which the factors are updated. If update_way = 1
% ,the factors are updated from right to left, and if update_way = 0,
% the factors are updated from left to right. The default value is 0.
%
% 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, 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
% 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>
%%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment