www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptim/getDependentPtrs.m
function pDep = getDependentPtrs(obj) %GETDEPENDENTPTRS List of dependent pointers % % PDEP = GETDEPENDENTPTRS(OBJ) returns a list of dependent pointers for % this item. A dependent pointer is a pointer to an object connected to % the current which belongs to another CAGE object. % Copyright 2000-2009 The MathWorks, Inc. % All cage items we are directly using pDep = obj.values; if ~isempty(obj.oppoints) pDep = [pDep getDependentPtrs(obj.oppoints)]; end % Ask objectives and constraints for their items for n = 1:length(obj.Objectives) pDep = [pDep getDependentPtrs(obj.Objectives{n})]; end for n = 1:length(obj.Constraints) pDep = [pDep getDependentPtrs(obj.Constraints{n})]; end % remove null pointers pDep(pDep==0) = [];