diff config/SMALL_learn_config.m @ 199:751fa3bddd30 luisf_dev

Added config file for SMALL_solve (removed the if/else code from SMALL_solve); added headers to both config files;
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 20 Mar 2012 14:28:51 +0000
parents 759313488e7b
children 198d4d9cee74
line wrap: on
line diff
--- a/config/SMALL_learn_config.m	Tue Mar 20 12:29:47 2012 +0000
+++ b/config/SMALL_learn_config.m	Tue Mar 20 14:28:51 2012 +0000
@@ -1,18 +1,32 @@
+%% Configuration file used in SMALL_learn
+%
+%   Use this file to change the dictionary learning algorithms in SMALLBox
+%   Please refer to the documentation before editing this file
 
+%   Centre for Digital Music, Queen Mary, University of London.
+%   This file copyright 2009 Ivan Damnjanovic.
+%
+%   This program is free software; you can redistribute it and/or
+%   modify it under the terms of the GNU General Public License as
+%   published by the Free Software Foundation; either version 2 of the
+%   License, or (at your option) any later version.  See the file
+%   COPYING included with this distribution for more information.
+%
+%%
 
-  if strcmpi(DL.toolbox,'KSVD')
-    param=DL.param; 
+if strcmpi(DL.toolbox,'KSVD')
+    param=DL.param;
     param.data=Problem.b;
- 
+    
     D = eval([DL.name,'(param)']);%, ''t'', 5);']);
-  elseif strcmpi(DL.toolbox,'KSVDS')
-    param=DL.param; 
+elseif strcmpi(DL.toolbox,'KSVDS')
+    param=DL.param;
     param.data=Problem.b;
     
     D = eval([DL.name,'(param, ''t'', 5);']);
-  elseif strcmpi(DL.toolbox,'SPAMS')
+elseif strcmpi(DL.toolbox,'SPAMS')
     
-    X  = Problem.b; 
+    X  = Problem.b;
     param=DL.param;
     
     D = eval([DL.name,'(X, param);']);
@@ -23,9 +37,9 @@
     for i = 1: size(D,2)
         D(:,i)=D(:,i)/norm(D(:,i));
     end
-  elseif strcmpi(DL.toolbox,'SMALL')
+elseif strcmpi(DL.toolbox,'SMALL')
     
-    X  = Problem.b; 
+    X  = Problem.b;
     param=DL.param;
     
     D = eval([DL.name,'(X, param);']);
@@ -36,8 +50,8 @@
         D(:,i)=D(:,i)/norm(D(:,i));
     end
     
-   elseif strcmpi(DL.toolbox,'TwoStepDL')
-        
+elseif strcmpi(DL.toolbox,'TwoStepDL')
+    
     DL=SMALL_two_step_DL(Problem, DL);
     
     %   we need to make sure that columns are normalised to
@@ -49,7 +63,7 @@
     D = DL.D;
     
 elseif strcmpi(DL.toolbox,'MMbox')
-        
+    
     DL = wrapper_mm_DL(Problem, DL);
     
     %   we need to make sure that columns are normalised to
@@ -58,18 +72,18 @@
     for i = 1: size(DL.D,2)
         DL.D(:,i)=DL.D(:,i)/norm(DL.D(:,i));
     end
-    D = DL.D; 
-    
+    D = DL.D;
+      
 %   To introduce new dictionary learning technique put the files in
-%   your Matlab path. Next, unique name <TolboxID> for your toolbox needs 
+%   your Matlab path. Next, unique name <TolboxID> for your toolbox needs
 %   to be defined and also prefferd API for toolbox functions <Preffered_API>
-%   
+%
 % elseif strcmpi(DL.toolbox,'<ToolboxID>')
 %     % This is an example of API that can be used:
 %     % - get training set from Problem part of structure
 %     % - assign parameters defined in the main program
 %
-%     X  = Problem.b; 
+%     X  = Problem.b;
 %     param=DL.param;
 %
 %     % - Evaluate the function (DL.name - defined in the main) with
@@ -77,7 +91,7 @@
 %
 %     D = eval([DL.name,'(<Preffered_API>);']);
 
-  else
+else
     printf('\nToolbox has not been registered. Please change SMALL_learn file.\n');
     return
-  end
+end