Mercurial > hg > smallbox
comparison config/SMALL_solve_config.m @ 228:198d4d9cee74 luisf_dev
Now can use a local configuration file, which is a copy of the default config files, and thus not being commited to the repository.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 12 Apr 2012 15:06:41 +0100 |
parents | c1efdd5d6250 |
children | 5c8bcdadb380 |
comparison
equal
deleted
inserted
replaced
227:b50e2b6a9c37 | 228:198d4d9cee74 |
---|---|
1 %% Configuration file used in SMALL_solve | 1 %% Configuration file used in SMALL_solve |
2 % | 2 % |
3 % Use this file to change the solvers in SMALLBox | 3 % Please DO NOT use this file to change the solvers used in SMALLBox |
4 % Please refer to the documentation before editing this file | 4 % If you want to change the solvers create a copy |
5 % of this file named 'SMALL_learn_config_local.m' | |
6 % | |
7 % Please refer to the documentation for further information | |
5 | 8 |
6 % Centre for Digital Music, Queen Mary, University of London. | 9 % Centre for Digital Music, Queen Mary, University of London. |
7 % This file copyright 2009 Ivan Damnjanovic. | 10 % This file copyright 2009 Ivan Damnjanovic. |
8 % | 11 % |
9 % This program is free software; you can redistribute it and/or | 12 % This program is free software; you can redistribute it and/or |
11 % published by the Free Software Foundation; either version 2 of the | 14 % published by the Free Software Foundation; either version 2 of the |
12 % License, or (at your option) any later version. See the file | 15 % License, or (at your option) any later version. See the file |
13 % COPYING included with this distribution for more information. | 16 % COPYING included with this distribution for more information. |
14 % | 17 % |
15 %% | 18 %% |
19 | |
16 | 20 |
17 if strcmpi(solver.toolbox,'sparselab') | 21 if strcmpi(solver.toolbox,'sparselab') |
18 y = eval([solver.name,'(SparseLab_A, b, n,',solver.param,');']); | 22 y = eval([solver.name,'(SparseLab_A, b, n,',solver.param,');']); |
19 elseif strcmpi(solver.toolbox,'sparsify') | 23 elseif strcmpi(solver.toolbox,'sparsify') |
20 if isa(Problem.A,'float') | 24 if isa(Problem.A,'float') |
35 elseif (strcmpi(solver.toolbox, 'ompbox')) | 39 elseif (strcmpi(solver.toolbox, 'ompbox')) |
36 G=A'*A; | 40 G=A'*A; |
37 epsilon=solver.param.epsilon; | 41 epsilon=solver.param.epsilon; |
38 maxatoms=solver.param.maxatoms; | 42 maxatoms=solver.param.maxatoms; |
39 y = eval([solver.name,'(A, b, G,epsilon,''maxatoms'',maxatoms,''checkdict'',''off'');']); | 43 y = eval([solver.name,'(A, b, G,epsilon,''maxatoms'',maxatoms,''checkdict'',''off'');']); |
40 % danieleb: added call to omp functions with fast implementation. | 44 % danieleb: added call to omp functions with fast implementation. |
41 elseif (strcmpi(solver.toolbox, 'ompbox_fast')) | 45 elseif (strcmpi(solver.toolbox, 'ompbox_fast')) |
42 DtX=A'*b; | 46 DtX=A'*b; |
43 XtX = sum(b.*b); | 47 XtX = sum(b.*b); |
44 G=A'*A; | 48 G=A'*A; |
45 epsilon=solver.param.epsilon; | 49 epsilon=solver.param.epsilon; |
46 maxatoms=solver.param.maxatoms; | 50 maxatoms=solver.param.maxatoms; |
47 y = eval([solver.name,'(DtX, XtX, G,epsilon,''maxatoms'',maxatoms,''checkdict'',''off'');']); | 51 y = eval([solver.name,'(DtX, XtX, G,epsilon,''maxatoms'',maxatoms,''checkdict'',''off'');']); |
48 elseif (strcmpi(solver.toolbox, 'ompsbox')) | 52 elseif (strcmpi(solver.toolbox, 'ompsbox')) |
49 basedict = Problem.basedict; | 53 basedict = Problem.basedict; |
69 A = opToMatrix(Problem.A, 1); | 73 A = opToMatrix(Problem.A, 1); |
70 end | 74 end |
71 | 75 |
72 [y, cost] = wrapper_mm_solver(b, A, solver.param); | 76 [y, cost] = wrapper_mm_solver(b, A, solver.param); |
73 | 77 |
78 %% | |
79 % Please do not make any changes to the 'SMALL_solve_config.m' file | |
80 % All the changes should be done to your local configuration file | |
81 % named 'SMALL_solve_config_local.m' | |
82 % | |
74 % To introduce new sparse representation algorithm put the files in | 83 % To introduce new sparse representation algorithm put the files in |
75 % your Matlab path. Next, unique name <TolboxID> for your toolbox and | 84 % your Matlab path. Next, unique name <TolboxID> for your toolbox and |
76 % prefferd API <Preffered_API> needs to be defined. | 85 % prefferd API <Preffered_API> needs to be defined. |
77 % | 86 % |
78 % elseif strcmpi(solver.toolbox,'<ToolboxID>') | 87 % elseif strcmpi(solver.toolbox,'<ToolboxID>') |