This is a static copy of a profile reportHome
add_generator_new (9 calls, 4.547 sec)
Generated 15-Mar-2007 12:01:47 using real time.
M-function in file c:\mind07\add_generator_new.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 |
3 | load('C:\mind_data06');clear Q... | 9 | 4.547 s | 100.0% |  |
4 | Q=Q_theme; | 9 | 0.000 s | 0.0% |  |
12 | prob_add=(mu/(n+1))*Q(g); | 9 | 0.000 s | 0.0% |  |
14 | prob_add=prob_add/(1+prob_add)... | 9 | 0.000 s | 0.0% |  |
16 | content=[content;[1+max(conten... | 9 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 4.547 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
select | M-function | 18 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 4.547 s | 100.0% |  |
Totals | | | 4.547 s | 100% | |
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in file | 20 |
Non-code lines (comments, blank lines) | 6 |
Code lines (lines that can run) | 14 |
Code lines that did run | 9 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 64.29 % |
Function listing
time calls line
1 function [content,connector]=add_generator_new(content,connector,Q_theme)
2 %differs from "add_g" in "january" in that connector is not changed
4.55 9 3 load('C:\mind_data06');clear Q;
< 0.01 9 4 Q=Q_theme;
9 5 g=select(Q./sum(Q));
9 6 if isempty(content)
7 content=[content;[1,g]];
8 return
9 end
10
9 11 n=length(content(:,1));
< 0.01 9 12 prob_add=(mu/(n+1))*Q(g);
13 %check this!
< 0.01 9 14 prob_add=prob_add/(1+prob_add);
9 15 if select([prob_add,1-prob_add])==1
9 16 content=[content;[1+max(content(:,1)),g]];
17
18
19 else
20 end