Mercurial > hg > ltpda
comparison m-toolbox/classes/@LTPDAHelper/generateFunctionList.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 function fcns = generateFunctionList() | |
2 | |
3 fcns = []; | |
4 % Get current verbose level | |
5 vl = LTPDAprefs.verboseLevel; | |
6 LTPDAprefs('Display', 'verboseLevel', -1) | |
7 % Add each user class | |
8 ucls = utils.helper.ltpda_userclasses; | |
9 | |
10 %% Build the infrastructure first | |
11 | |
12 % Now go through and add the contents | |
13 for jj=1:numel(ucls) | |
14 disp(sprintf('** Building: %s', ucls{jj})); | |
15 % add each algorithm for this class/category | |
16 [clmethods, infos] = utils.helper.getPublicMethods(ucls{jj}); | |
17 % add each method to its subcategory | |
18 for ll=1:numel(clmethods) | |
19 ii = infos(ll); | |
20 % fprintf(' + adding method %s/%s\n', ucls{jj}, clmethods{ll}); | |
21 a = local_minfo2algo(ii); | |
22 fcns = [fcns a]; | |
23 end | |
24 end | |
25 % set verbose level again | |
26 LTPDAprefs('Display', 'verboseLevel', vl) | |
27 | |
28 end | |
29 | |
30 function a = local_minfo2algo(ii) | |
31 | |
32 a = mpipeline.jltpda.LTPDAalgorithm; | |
33 a.setMname(ii.mname); | |
34 a.setMcategory(ii.mcategory); | |
35 a.setMclass(ii.mclass); | |
36 a.setMinInputs(ii.argsmin); | |
37 a.setMaxInputs(ii.argsmax); | |
38 a.setMinOutputs(ii.outmin); | |
39 a.setMaxOutputs(ii.outmax); | |
40 | |
41 % get default plist for this method | |
42 for pp = 1:numel(ii.sets) | |
43 set = ii.sets{pp}; | |
44 mpl = ii.plists(pp); | |
45 % build java plist | |
46 jpl = LTPDAworkbench.mpl2jpl(mpl); | |
47 a.addSetPlist(set,jpl); | |
48 end | |
49 | |
50 end | |
51 |