This is a static copy of a profile report

Home

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

Home

get_Q>sample_basis (Calls: 1, Time: 50.134 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
92
B_sample = 0;
1218750.114 s100.0%
93
for k = 1:nr_B
121870.008 s0.0%
95
end
10.007 s0.0%
87
% sample a unit vector
10.002 s0.0%
86
10.001 s0.0%
All other lines  0.001 s0.0%
Totals  50.134 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function17
Non-code lines (comments, blank lines)8
Code lines (lines that can run)9
Code lines that did run9
Code lines that did not run5
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
< 0.001 
      1 
  83
function B_sample = sample_basis(basis) 
  84 
% get block diagonalization
  85 
nr_B = length(basis);
< 0.001 
      1 
  86
 
  0.002 
      1 
  87
% sample a unit vector 
  88 
x = randn(nr_B,1);
  89 
x = x./norm(x);
< 0.001 
      1 
  90
 
< 0.001 
      1 
  91
% randomly sample a symmetric matrix from the basis B of the commutant 
 50.114 
  12187 
  92
B_sample = 0; 
  0.008 
  12187 
  93
for k = 1:nr_B 
  94 
    B_sample = B_sample + basis{k}*x(k);
  0.007 
      1 
  95
end 
  96 
% symmetric the sample
< 0.001 
      1 
  97
B_sample = (B_sample+B_sample')/2; 
  98 

  99 
end

Other subfunctions in this file are not included in this listing.