Norm.m

From Spinach Documentation Wiki
Jump to: navigation, search

Computes the norm of the matrix represented by a tensor train. Syntax:

                      ttnorm=norm(ttrain,norm_type)
      norm_type=1         returns the 1-norm
      norm_type=inf       returns the inf-norm
      norm_type=2         returns the 2-norm
      norm_type='fro'     returns the Frobenius norm

Note: norms other than Frobenius norm are expensive for tensor trains.