This is a static copy of a profile reportHome
Function details for get_Q>sample_basisThis is a static copy of a profile reportHome
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 Name | Function Type | Calls |
get_Q | function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
92 | B_sample = 0; | 12187 | 50.114 s | 100.0% | |
93 | for k = 1:nr_B | 12187 | 0.008 s | 0.0% | |
95 | end | 1 | 0.007 s | 0.0% | |
87 | % sample a unit vector | 1 | 0.002 s | 0.0% | |
86 | | 1 | 0.001 s | 0.0% | |
All other lines | | | 0.001 s | 0.0% | |
Totals | | | 50.134 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Coverage results
Show coverage for parent directory
Total lines in function | 17 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 9 |
Code lines that did run | 9 |
Code lines that did not run | 5 |
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.