insert: Directly Insert Into Distributed Matrix Submatrix Slot

Description Usage Arguments Details Value

Description

Allows you to directly replace the submatrix of a distributed matrix.

Usage

1
2
3
4
5
## S4 replacement method for signature 'ddmatrix,ANY,ANY,ANY'
x[i, j, ...] <- value

## S4 replacement method for signature 'ddmatrix,ANY,ANY,ddmatrix'
x[i, j, ...] <- value

Arguments

x

numeric distributed matrix.

i, j

global integer indices.

...

Additional arguments.

value

replacement value. Can be a global vector or a ddmatrix.

Details

[<- allows the user to insert values into a distributed matrix in exactly the same way one would with an ordinary matrix. The indices here are global, meaning that x[i, j] refers to the (i, j)'th element of the "full", global matrix, and not necessarily the (i, j)'th element of the local submatrix.

On the other hand, submatrix<- is different. It is basically syntactic sugar for:

x@Data <- newMatrix

It does not alter the distributed matrix x's dim or bldim. It does adjust the ldim automatically. However, using this can be dangerous. It is merely provided to give consistent behavior with the submatrix() function.

Value

Returns a distributed matrix.


RBigData/pbdDMAT documentation built on Oct. 29, 2021, 6:20 p.m.