Minor update to Matlab interface

This commit is contained in:
Marcel Kronfeld 2011-03-28 16:07:40 +00:00
parent 0c6685fa67
commit 732ed71b42

View File

@ -1,17 +1,28 @@
function desc = getDesc(int, ID) function desc = getDesc(int, ID, showValues)
% desc = getDesc(int, ID)
% desc = getDesc(int, ID, showValues)
% desc = getDesc(int, obj)
% desc = getDesc(int, obj, showValues)
% For an integer ID, return the String description of the indicated optimizer % For an integer ID, return the String description of the indicated optimizer
% with member descriptions. In case ID is of a different type, it is attempted % with member descriptions. In case the first argument is an object of a different type,
% to retrieve a String description for that object directly. % it is attempted to retrieve a String description for that object directly.
% If showValues==1, the current values of the listed properties are also returned.
import eva2.gui.BeanInspector; import eva2.gui.BeanInspector;
import eva2.server.modules.GOParameters; import eva2.server.modules.GOParameters;
import eva2.OptimizerFactory; import eva2.OptimizerFactory;
showVals=false;
if exist('showValues','var')
if showValues==1
showVals=true;
end
end
if isnumeric(ID) if isnumeric(ID)
params = OptimizerFactory.getParams(ID, int.mp); params = OptimizerFactory.getParams(ID, int.mp);
desc = BeanInspector.getDescription(params.getOptimizer, false); desc = BeanInspector.getDescription(params.getOptimizer, showVals);
else else
desc = BeanInspector.getDescription(ID, false); desc = BeanInspector.getDescription(ID, showVals);
end end