This is a static copy of a profile report

Home

Function details for eigs>extraChecksThis is a static copy of a profile report

Home

eigs>extraChecks (Calls: 1, Time: 0.001 s)
Generated 22-Jul-2019 16:32:29 using performance time.
subfunction in file C:\Program Files\MATLAB\R2019a\toolbox\matlab\sparfun\eigs.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
eigsfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
787
if ismember(innerOpts.method, ...
10.000 s63.2%
826
&& ismember(innerOpts....
10.000 s20.1%
784
innerOpts.ishermprob = innerOp...
10.000 s5.2%
825
if ~innerOpts.userp &&...
10.000 s3.7%
838
end
10.000 s1.4%
All other lines  0.000 s6.4%
Totals  0.001 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
cell.ismemberfunction20.000 s44.8%
Self time (built-ins, overhead, etc.)  0.000 s55.2%
Totals  0.001 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function59
Non-code lines (comments, blank lines)23
Code lines (lines that can run)36
Code lines that did run6
Code lines that did not run30
Coverage (did run/can run)16.67 %
Function listing
time 
Calls 
 line
 780 
function [innerOpts, useEig, eigsSigma] = extraChecks(innerOpts, B, n, k, spdB, useEig, eigsSigma)
 781 
% Do remaining argument checks that require knowing the problem type
 782 

 783 
% If B not HPD, OP is not Hermitian (even if A is)
< 0.001 
      1 
 784
innerOpts.ishermprob = innerOpts.ishermprob && (isempty(B) || spdB); 
 785 

 786 
% Maintain old sigma behavior and convert to new sigma
< 0.001 
      1 
 787
if ismember(innerOpts.method, {'LI', 'SI'}) 
 788 
    if innerOpts.isrealprob && ~innerOpts.ishermprob
 789 
        if strcmp(innerOpts.method, 'LI')
 790 
            eigsSigma = 'bothendsimag';
 791 
            innerOpts.method = eigsSigma;
 792 
        else
 793 
            eigsSigma = 'smallestimagabs';
 794 
            innerOpts.method = eigsSigma;
 795 
        end
 796 
    else
 797 
        if strcmp(innerOpts.method, 'LI')
 798 
            eigsSigma = 'largestimag';
 799 
            innerOpts.method = eigsSigma;
 800 
        else
 801 
            eigsSigma = 'smallestimag';
 802 
            innerOpts.method = eigsSigma;
 803 
        end
 804 
    end
 805 
end
 806 

 807 
% Extra Checks on sigma
< 0.001 
      1 
 808
if innerOpts.ishermprob 
 809 
    if ismember(innerOpts.method, {'largestimag', 'smallestimag', 'bothendsimag'})
 810 
        % Problem has all real eigenvalues, and therefore we cannot sort
 811 
        % them by imaginary part. Sort instead by abs(real)
 812 
        innerOpts.method = 'largestabs';
 813 
    end
 814 
    
 815 
    if ~isreal(innerOpts.sigma)
 816 
        % Problem has all real eigenvalues but a complex shift
 817 
        % Taking the real part keeps the problem real and symmetric but
 818 
        % results will be the same
 819 
        innerOpts.sigma = real(innerOpts.sigma);
 820 
    end
 821 
end
 822 

 823 
% Extra check/set default for input OPTS.p
 824 

< 0.001 
      1 
 825
if ~innerOpts.userp && innerOpts.isrealprob && ~innerOpts.ishermprob ... 
      1 
 826
        && ismember(innerOpts.method, {'largestimag', 'smallestimag'}) 
 827 
    
 828 
    % Raise p to account for needing to add conjugate pairs to the subspace
 829 
    innerOpts.p = min(max(4*k,20),n);
 830 
    
 831 
    if innerOpts.p == n
 832 
        % Since we are building the whole space anyway, do a full
 833 
        % decomposition
 834 
        useEig = true;
 835 
    end
 836 
end
 837 

< 0.001 
      1 
 838
end 

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