Skip to content
Snippets Groups Projects
Commit 4b83fff8 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Function dependency: added some information about upcoming features

parent 4798ff61
Branches continue_spectrum_refactoring
No related tags found
No related merge requests found
......@@ -37,7 +37,11 @@ function deps = gtGetFunctionDeps(functionNames, deps, pattern, exclude)
end
for name = functionNames
listing = depfun(name, '-toponly', '-quiet');
listing = depfun(name, '-toponly', '-quiet'); %#ok<DEPFUN>
% New suggested alternative is damn slow!! (78 seconds in this
% recursively filtered setting, otherwise 35 seconds, but still slow
% if compared to the 1.4 seconds of depfun)
% listing = matlab.codetools.requiredFilesAndProducts(name, 'toponly')';
listing = setdiff(listing, intersect(deps, listing));
if (~isempty('pattern'))
listing = filterListing(listing, pattern, exclude);
......@@ -46,15 +50,11 @@ function deps = gtGetFunctionDeps(functionNames, deps, pattern, exclude)
deps = gtGetFunctionDeps(listing, deps, pattern, exclude);
end
end
end
%%
% sub-functions
function listing = filterListing(listing, patternList, exclude)
for patternInternal = patternList
matches = regexp(listing, patternInternal);
listing = listing(cellfun(@(x)isempty(x), matches) == exclude);
end
function listing = filterListing(listing, patternList, exclude)
for patternInternal = patternList
matches = regexp(listing, patternInternal);
listing = listing(cellfun(@(x)isempty(x), matches) == exclude);
end
end % end of function
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment