norm.Hermitian(x, type="M", lower=T)
"Hermitian"
and
"Matrix"
.
"1"
or
"I"
indicates the one
or infinity norm (maximum absolute column or row sum),
"F"
indicates the
Frobenius seminorm (the Euclidean norm of
x
treated as if it were a vector),
and
"M"
indicates the maximum modulus of all the elements in
x
.
The default is
"M"
"norm"
,
representing the quantity chosen according to
type
.
A copy of the call to
"norm"
is returned as an attribute.
Based on the functions dlansy and zlanhe from Lapack (Anderson et al. (1994)).
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia. Golub, G., and Van Loan, C. F. (1989). Matrix Computations, 2nd edition, Johns Hopkins, Baltimore.
x <- Matrix( sample(-3:3, size = 9, replace = T), nrow = 3, ncol = 3) x[row(x) > col(x)] <- t(x)[row(x) > col(x)] # construct symmetric matrix class(x) <- Matrix.class(x) norm(x, "1") norm(x, "I") norm(x, "F") norm(x, "M")