This is a static copy of a profile report

Home

dom_thought (5 calls, 0.016 sec)
Generated 15-Mar-2007 12:01:54 using real time.
M-function in file c:\mind07\dom_thought.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
see_mind_domM-function2
legacyM-function3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
21
[c,v]=conn_comp(graph);
40.016 s99.9%
5
content1=[];connector1=[];
10.000 s0.0%
32
connector1=[];
40.000 s0.0%
14
h1=connector(j,1);h2=connector...
90.000 s0.0%
37
end
90 s0%
Other lines & overhead  0 s0%
Totals  0.016 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
conn_compM-function40 s0%
ismemberM-function170 s0%
Self time (built-ins, overhead, etc.)  0.016 s99.9%
Totals  0.016 s100% 
M-Lint results
Line numberMessage
4Use || instead of | as the OR operator in (scalar) conditional statements.
17Logical indexing is usually faster than FIND.
17Logical indexing is usually faster than FIND.
21The value assigned here to variable 'c' might never be used.
23The value assigned here to variable 'y' might never be used.
24Logical indexing is usually faster than FIND.
34Use && instead of & as the AND operator in (scalar) conditional statements.
Coverage results
[ Show coverage for parent directory ]
Total lines in file37
Non-code lines (comments, blank lines)8
Code lines (lines that can run)29
Code lines that did run27
Code lines that did not run2
Coverage (did run/can run)93.10 %
Function listing
   time   calls  line
1 function [content1,connector1]=dom_thought(content,connector)
2 %computes connected components in thought chatter and finds largest
3 %component
5 4 if isempty(connector) | isempty(content)
< 0.01 1 5 content1=[];connector1=[];
1 6 return
4 7 else
4 8 end
9
4 10 n=length(content(:,1));m=length(connector(:,1));
11 %create DI-graph
4 12 graph=zeros(n);
4 13 for j=1:m
< 0.01 9 14 h1=connector(j,1);h2=connector(j,2);
9 15 i1=find(content(:,1)==h1);
9 16 i2=find(content(:,1)==h2);
9 17 graph(i1,i2)=1;
9 18 end
19
20 %find connected components
0.02 4 21 [c,v]=conn_comp(graph);
4 22 ls=sum((v>0),2);
4 23 [y,i]=max(ls);
4 24 is=v(i,:);is=find(is);is=v(i,is);
4 25 if ischar(is)
26 content1=content;connector1=connector;
27 return
4 28 else
4 29 end
4 30 content1=content(is,:);
31 %find rows in new connector1
< 0.01 4 32 connector1=[];
4 33 for j=1:m
9 34 if ismember(connector(j,1),content1(:,1))&ismember(connector(j,2),content(:,1))
8 35 connector1=[connector1;connector(j,:)];
8 36 end
9 37 end