This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
21 | [c,v]=conn_comp(graph); | 4 | 0.016 s | 99.9% |  |
5 | content1=[];connector1=[]; | 1 | 0.000 s | 0.0% |  |
32 | connector1=[]; | 4 | 0.000 s | 0.0% |  |
14 | h1=connector(j,1);h2=connector... | 9 | 0.000 s | 0.0% |  |
37 | end | 9 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.016 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
conn_comp | M-function | 4 | 0 s | 0% |  |
ismember | M-function | 17 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.016 s | 99.9% |  |
Totals | | | 0.016 s | 100% | |
M-Lint results
Line number | Message |
4 | Use || instead of | as the OR operator in (scalar) conditional statements. |
17 | Logical indexing is usually faster than FIND. |
17 | Logical indexing is usually faster than FIND. |
21 | The value assigned here to variable 'c' might never be used. |
23 | The value assigned here to variable 'y' might never be used. |
24 | Logical indexing is usually faster than FIND. |
34 | Use && instead of & as the AND operator in (scalar) conditional statements. |
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 37 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 29 |
Code lines that did run | 27 |
Code lines that did not run | 2 |
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