This is a static copy of a profile report

Home

Function details for get_Q>get_blk_sizesThis is a static copy of a profile report

Home

get_Q>get_blk_sizes (Calls: 1, Time: 0.006 s)
Generated 20-Jul-2018 02:24:58 using performance time.
subfunction in file C:\Users\yz\Dropbox\Workspace\Researches\PhD Research\My Papers\2018_symmtry_reduction\18groupsymmetrySDPSlaterHaoRenata.d\codesgroupsymmetrySDPSlaterHaoRenata.d\qap\sub-routines\get_Q.m
Copy to new window for comparing multiple runs

This function changed during profiling or before generation of this report. Results may be incomplete or inaccurate.

Parents (calling functions)

Function NameFunction TypeCalls
get_Qfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
109
for i = 2:m
10240.004 s73.4%
114
% the cardinality of the k-th ...
10240.000 s7.1%
104
% get the block sizes
10.000 s5.3%
107
blk_sizes(1) = 1;
10.000 s3.6%
115
blk_sizes(k) = blk_sizes(k) + ...
10.000 s3.0%
All other lines  0.000 s7.5%
Totals  0.006 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function21
Non-code lines (comments, blank lines)9
Code lines (lines that can run)12
Code lines that did run12
Code lines that did not run5
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
 102 
function blk_sizes = get_blk_sizes(blk_nz)
      1 
 103
 
< 0.001 
      1 
 104
% get the block sizes 
< 0.001 
      1 
 105
m = length(blk_nz); 
      1 
 106
blk_sizes = zeros(m,1); 
< 0.001 
      1 
 107
blk_sizes(1) = 1; 
 108 
k = 1;
  0.004 
   1024 
 109
for i = 2:m 
< 0.001 
    197 
 110
    % create a new block if this is satisfied 
< 0.001 
    197 
 111
    if sum(blk_nz(1:i-1,i)) == 0 && sum(blk_nz(i:end,i-1)) == 0 
 112 
        k = k + 1;
< 0.001 
   1024 
 113
    end 
< 0.001 
   1024 
 114
    % the cardinality of the k-th block is increased by 1 
< 0.001 
      1 
 115
    blk_sizes(k) = blk_sizes(k) + 1; 
 116 
end
 117 
blk_sizes = blk_sizes(1:k);
 118 

 119 
% remark: difference between zero_pattern and block_pattern
< 0.001 
      1 
 120
% if (i,j) is an entry in k-th block and B_l(i,j) = 0  for all l, 
 121 
% then zero_pattern(i,j) = 0, but block_pattern(i,j) = k
 122 
end