cheap_norm.m

From Spinach Documentation Wiki
Revision as of 15:16, 12 January 2019 by Admin (talk | contribs) (Created page with "{{DISPLAYTITLE:cheap_norm.m}} __NOTOC__ The cheapest possible norm for various representations of matrices. CUDA stores matrices by rows, Matlab by columns, and polyadic objec...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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)

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

  1. Some norms are vastly more expensive than others, this function uses the cheapest ones available.
  2. 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