www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgpointconstraint/getSummary.m
function [feasSummary, valueDesc, conSummary, leftSummary, rightSummary] = ... getSummary( obj, inputValues, feasValue, conValue, leftValue, rightValue, DS ) %GETSUMMARY Return a summarised evaluation of the constraint % % [FEASSUMMARY, VALUEDESC, CONSUMMARY, LEFTSUMMARY, RIGHTSUMMARY] = % GETSUMMARY(OBJ, INPUTVALUES, FEASVALUE, CONVALUE, LEFTVALUE, % RIGHTVALUE) returns a summarised evaluation of OBJ. % % CONVALUE, LEFTVALUE, RIGHTVALUE and FEASVALUE are evaluations of OBJ % from which the summarized values are generated. The input values at % which OBJ was evaluated are also supplied through INPUTVALUES. % % DS is a cgstaticdataset object if the constraint is evaluated over a % dataset. Otherwise it is empty. % % VALUEDESC is a 1-by-NSUMMARY cell array of descriptions of each % constraint value. CONSUMMARY, LEFTSUMMARY, RIGHTSUMMARY and FEASSUMMARY % are 1-by-NSUMMARY summarized evaluations of OBJ. % % FEASSUMMARY = GETSUMMARY(OBJ, FEASVALUE, CONVALUE, LEFTVALUE, % RIGHTVALUE) returns a summarised feasibility status of the constraints % only. % Copyright 2007-2009 The MathWorks, Inc. % Just pass feasible values straight back out feasSummary = feasValue; if nargout > 1 % Constraint descriptions [templateStr, inputNames] = charForSummary(obj); if ~isempty(DS) templateStr = [DS.Name,'(%d): ', templateStr]; end valueDesc = i_generateDescriptionString(obj, templateStr, inputNames, inputValues); % Summarised constraint evaluation conSummary = conValue; leftSummary = leftValue; rightSummary = rightValue; end function valueDesc = i_generateDescriptionString(obj, templateStr, inputNames, inputValues) valueDesc = pInsertIndicesIntoTemplate(obj, templateStr, inputNames, inputValues);