Difference between revisions of "Cheap norm.m"
(Normalise sequential blank lines) |
m (Correct function page syntax from current Spinach source) |
||
| Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
| − | n=cheap_norm(A) | + | |
| + | n=cheap_norm(A,t,itmax) | ||
==Arguments== | ==Arguments== | ||
Revision as of 14:11, 5 June 2026
The cheapest possible norm for various representations of matrices. CUDA stores matrices by rows, Matlab by columns, and polyadic objects can only multiply vectors, in which case Algorithm 2.1 from Hager's paper (https://doi.org/10.1137/S0895479899356080) is used with Higham's extension to the complex case.
Syntax
n=cheap_norm(A,t,itmax)
Arguments
A - a matrix, or a polyadic representation thereof
Outputs
n - infinity-norm for GPU arrays, 1-norm for CPU arrays,
and Hager's upper bound on 1-norm for polyadics
Notes
- Some norms are vastly more expensive than others, this function uses the cheapest ones available.
- In very rare cases, Hager's algorithm stagnates. If this happens, drop us a note and we will implement Higham's more recent work.
See also
clean_up.m, frob_chop.m, hdot.m, mprealloc.m
Version 2.3, authors: Ilya Kuprov