sum: sum

Description Usage Arguments Details Value Communication Examples

Description

Sums the elements of a shaq.

Usage

1
2
## S4 method for signature 'shaq'
sum(x, ..., na.rm = FALSE)

Arguments

x

A shaq.

...

Additionaly elements (shaqs or numeric vectors/matrices) to sum. Regular vectors/matrices are assumed to be global, but will only be included to the sum on rank 0.

na.rm

should NA's be removed?

Details

Combinations of shaq and numeric matrices/vectors can be used, so long as the first item is always a shaq.

Value

A single value.

Communication

Communication consists of a an allreduce on a single value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(kazaam)
x = ranshaq(runif, 10, 3)

sum(x)
sum(x, 1)

finalize()

## End(Not run)

RBigData/pbdSHAQ documentation built on Nov. 9, 2021, 9:10 a.m.