arithmetic: Arithmetic Operators

Description Usage Arguments Details Value Examples

Description

Binary operations for distributed matrix/distributed matrix and distributed matrix/vector operations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## S4 method for signature 'ddmatrix,numeric'
e1 + e2

## S4 method for signature 'numeric,ddmatrix'
e1 + e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 + e2

## S4 method for signature 'ddmatrix,numeric'
e1 - e2

## S4 method for signature 'numeric,ddmatrix'
e1 - e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 - e2

## S4 method for signature 'ddmatrix,missing'
e1 - e2

## S4 method for signature 'ddmatrix,numeric'
e1 * e2

## S4 method for signature 'numeric,ddmatrix'
e1 * e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 * e2

## S4 method for signature 'ddmatrix,numeric'
e1 / e2

## S4 method for signature 'numeric,ddmatrix'
e1 / e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 / e2

## S4 method for signature 'ddmatrix,numeric'
e1 ^ e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 ^ e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 %% e2

## S4 method for signature 'ddmatrix,numeric'
e1 %% e2

## S4 method for signature 'numeric,ddmatrix'
e1 %% e2

## S4 method for signature 'ddmatrix,ddmatrix'
e1 %/% e2

## S4 method for signature 'numeric,ddmatrix'
e1 %/% e2

## S4 method for signature 'ddmatrix,numeric'
e1 %/% e2

Arguments

e1, e2

numeric distributed matrices or numeric vectors

Details

If e1 and e2 are distributed matrices, then they must be conformable, on the same BLACS context, and have the same blocking dimension.

Value

Returns a distributed matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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, bldim=2)

y <- (2*x) - x^(.5)
print(y)

finalize()

## End(Not run)

pbdDMAT documentation built on May 29, 2017, 1:23 p.m.