Learn R Programming

pbdDMAT (version 0.4-2)

ddmatrix-solve: Solve

Description

Solving linear systems and matrix inversion for distributed matrices with R-like syntax, with calculations performed by the PBLAS and ScaLAPACK libraries.

Usage

# S4 method for ddmatrix,ANY
solve(a)

# S4 method for ddmatrix,ddmatrix solve(a, b)

Arguments

a, b

numeric distributed matrices. Here, a and b must be on the same BLACS context and have the same blocking dimension.

Value

solve() solves systems and performs matrix inversion when argument b= is missing.

Details

Extensions of R linear algebra functions.

Examples

Run this code
# 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()

x <- ddmatrix(1:9, 3)

y <- solve(t(A) %*% A)
print(y)

finalize()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab