numpi / hm-toolbox

Toolbox for HODLR and HSS matrices in MATLAB
GNU General Public License v3.0
43 stars 8 forks source link

Minor bug in hss_from_random_sampling #5

Closed bonevbs closed 4 years ago

bonevbs commented 4 years ago

Hi, just another bug that I found: the estimation of the norm fails for rectangular matrices. The code should be

nrm = svds(@(x,t) normest_afun(Afun, Afunt, x, t), ...
        [m n], 1, 'largest', ...
        struct('tol', 1e-2)); nrm = nrm(1);
robol commented 4 years ago

Thanks Boris for spotting this, I applied the change you suggest!