norm: Matrix Norms

Description Usage Arguments Details Value References Examples

Description

Computes a matrix norm of x, using MAGMA for GPUs or PLASMA for multi-core CPUs. The norm can be the one norm, the infinity norm, the Frobenius norm, or the maximum modulus among elements of a matrix, as determined by the value of type. Not all norms are supported by MAGMA or PLASMA and these are documented below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'dsyMatrix'
norm(x, type, ...)
## S4 method for signature 'dgeMatrix'
norm(x, type, ...)
## S4 method for signature 'dpoMatrix'
norm(x, type, ...)
## S4 method for signature 'ldenseMatrix'
norm(x, type, ...)
## S4 method for signature 'ndenseMatrix'
norm(x, type, ...)

Arguments

x

a real matrix.

type

A character indicating the type of norm desired. All these norms are supported in the latest PLASMA library (v2.4.6 asof writing).

"O", "o" or "1"

specifies the one norm, (maximum absolute column sum); This is not supported in MAGMA currently.

"I" or "i"

specifies the infinity norm (maximum absolute row sum);

"F" or "f"

specifies the Frobenius norm (the Euclidean norm of x treated as if it were a vector); This is not supported in PLASMA versions < 2.4.6 or in MAGMA.

"M" or "m"

specifies the maximum modulus of all the elements in x. This is not supported in MAGMA for dgeMatrix, but is for symmetric matrices dpoMatrix and dsyMatrix.

The default is "O". Only the first character of type[1] is used.

...

further arguments passed to or from other methods.

Details

When or if the GPU is used magmablas_dlange for dgeMatrix is called or magmablas_dlansy is used for symmetric dsyMatrix or dpoMatrix. When the multi-core library PLASMA is used PLASMA_dlange and PLASMA_dlansy are used for the respective matrix types mentioned previously.

Value

A numeric value of class "norm", representing the quantity chosen according to type.

References

Martin Maechler, Douglas Bates (Matrix package)

Examples

1
2
3
4
5
x <- Hilbert(9)
norm(x, "1")
norm(x, "I")
norm(x, "F")
norm(x, "M")

HiPLARM documentation built on May 29, 2017, 10:42 p.m.

Related to norm in HiPLARM...