Learn R Programming

pbdDMAT (version 0.2-3)

Norm: Compute the Norm of a Distributed Matrix

Description

Computes the norm.

Usage

## S3 method for class 'ddmatrix':
norm(x, type = c("O", "I", "F", "M", "2"))

Arguments

x
numeric distributed matrices.
type
character. Determines which matrix norm is to be used.

Value

  • Returns a number.

See Also

ConditionNumbers

Examples

Run this code
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

library(pbdDMAT, quiet = TRUE)
init.grid()

comm.set.seed(diff=T)
x <- ddmatrix("rnorm", 10, 10)

nrm <- norm(x)

comm.print(nrm)

finalize()

Run the code above in your browser using DataLab