www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimstore/getNumLcon.m
function ncon = getNumLcon(optimstore, varargin) %GETNUMLCON Return the number of linear constraints per label % % NCON = GETNUMLCON(OPTIMSTORE) returns the number of constraints that % will be returned from an evaluation of each linear constraint. % % NCON = GETNUMLCON(OPTIMSTORE, CONLABELS) returns the number of % constraints from an evaluation of the defined constraints. % % See also CGOPTIMSTORE/GETNUMNONLCON, CGOPTIMSTORE/GETNUMCONSTRAINT % Copyright 2006 The MathWorks, Inc. ncon = getNumLcon(optimstore.OptimRunner); if nargin > 1 indx = pGetItemIndex(optimstore, varargin{1}, 'linearconstraint'); ncon = ncon(indx); end