Printing a Distributed Matrix

Description

Print method for a distributed matrices.

Usage

1
2
3
4
5
6
7
print(x, ...)

## S4 method for signature 'ddmatrix'
print(x, ..., all = FALSE, name = "x")

## S4 method for signature 'ddmatrix'
show(object)

Arguments

x, object

numeric distributed matrix

...

additional arguments

all

control for whether the entire distributed matrix should be printed to standard output

name

character string that will be printed to standard output along with the matrix elements

Details

Print method for class ddmatrix.

If argument all=TRUE, then a modified version of the ScaLAPACK TOOLS routine PDLAPRNT is used to print the entire distributed matrix. The matrix will be printed in column-major fashion, with one element of the matrix per line. If all=FALSE then the name= argument is ignored.

Value

The function silently returns 0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# 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()

# don't do this in production code
x <- matrix(1:16, ncol=4)
dx <- as.ddmatrix(x) 

print(dx)

print(dx, all=T)

finalize()

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.