funMD

PURPOSE ^

% Method of optiGTest class

SYNOPSIS ^

function isOk=funMD(obj,nbCol,type)

DESCRIPTION ^

% Method of optiGTest class
 L. LAURENT --  15/04/2018 -- luc.laurent@lecnam.net

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Method of optiGTest class
0002 % L. LAURENT --  15/04/2018 -- luc.laurent@lecnam.net
0003 
0004 % sources available here:
0005 % https://bitbucket.org/luclaurent/optigtest/
0006 % https://github.com/luclaurent/optigtest/
0007 
0008 % optiGTest - set of testing functions    A toolbox to easy manipulate functions.
0009 % Copyright (C) 2018  Luc LAURENT <luc.laurent@lecnam.net>
0010 %
0011 % This program is free software: you can redistribute it and/or modify
0012 % it under the terms of the GNU General Public License as published by
0013 % the Free Software Foundation, either version 3 of the License, or
0014 % (at your option) any later version.
0015 %
0016 % This program is distributed in the hope that it will be useful,
0017 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0019 % GNU General Public License for more details.
0020 %
0021 % You should have received a copy of the GNU General Public License
0022 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
0023 
0024 %% build table of all function in Markdown
0025 % INPUT:
0026 %  - nbCol: number of columns in the requested table
0027 % OUTPUTS:
0028 %  - isOk: status flag of the function
0029 
0030 function isOk=funMD(obj,nbCol,type)
0031 if nargin==1;nbCol=3;end
0032 isOk=true;
0033 if nargin<3;type='';end
0034 
0035 %extract name of functions
0036 switch type
0037     case {'cons','Cons'}
0038         strFun=loadDimCons();
0039         strPb=loadProbCons();
0040     case {'multi','Multi'}
0041         strFun=loadDimMulti();
0042         strPb=loadProbMulti();
0043     otherwise
0044         strFun=loadDimUn();
0045 end
0046 listFun=fieldnames(strFun);
0047 listDim=cell(1,numel(listFun));
0048 nbCons=zeros(1,numel(listFun));
0049 nbObj=zeros(1,numel(listFun));
0050 for itF=1:numel(listFun)
0051     listDim{itF}=strFun.(listFun{itF});
0052 end
0053 switch type
0054     case {'cons','Cons','multi','Multi'}
0055         for itF=1:numel(listFun)
0056             nbObj(itF)=numel(strPb(1).(listFun{itF}));
0057             nbCons(itF)=numel(strPb(2).(listFun{itF}));
0058         end
0059 end
0060 
0061 %generate Markdown table
0062 buildTableMD(listFun,listDim,nbCol,nbObj,nbCons);
0063 end

Generated on Tue 28-May-2019 16:00:34 by m2html © 2005