Methods for simple construction of distributed matrices.
ddmatrix(data, ...)# S4 method for ddmatrix
ddmatrix(data, nrow = 1, ncol = 1,
byrow = FALSE, ..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT)
# S4 method for missing
ddmatrix(data, nrow = 1, ncol = 1, byrow = FALSE,
..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT)
# S4 method for vector
ddmatrix(data, nrow = 1, ncol = 1, byrow = FALSE,
..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT)
# S4 method for matrix
ddmatrix(data, nrow = 1, ncol = 1, byrow = FALSE,
..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT)
# S4 method for character
ddmatrix(data, nrow = 1, ncol = 1,
byrow = FALSE, ..., min = 0, max = 1, mean = 0, sd = 1,
rate = 1, shape, scale = 1, bldim = .pbd_env$BLDIM,
ICTXT = .pbd_env$ICTXT)
ddmatrix.local(data, ...)
# S4 method for missing
ddmatrix.local(data, nrow = 1, ncol = 1,
byrow = FALSE, ..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$BLDIM)
# S4 method for vector
ddmatrix.local(data, nrow = 1, ncol = 1,
byrow = FALSE, ..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT)
# S4 method for matrix
ddmatrix.local(data, nrow = 1, ncol = 1,
byrow = FALSE, ..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT)
# S4 method for character
ddmatrix.local(data, nrow = 1, ncol = 1,
byrow = FALSE, ..., min = 0, max = 1, mean = 0, sd = 1,
rate = 1, shape, scale = 1, bldim = .pbd_env$BLDIM,
ICTXT = .pbd_env$ICTXT)
A global value: a string (for random generation) or an optional data vector. In the data vector case, the data should be the same across all processes.
Extra arguments
number of rows. Global rows for ddmatrix()
. Local rows
for ddmatrix.local()
. See details below.
number of columns. Global columns for ddmatrix()
. Local
columns for ddmatrix.local()
. See details below.
logical. If FALSE
then the distributed matrix will be
filled by column major storage, otherwise row-major.
blocking dimension.
BLACS context number.
Min and max values for random uniform generation.
Mean and standard deviation for random normal generation.
Rate for random exponential generation.
Shape and scale parameters for random weibull generation.
Returns a distributed matrix.
These methods are simplified methods of creating distributed matrices,
including random ones. These methods involve only local computations, i.e.,
no communication is performed in the construction of a ddmatrix
using
these methods (in contrast to using as.ddmatrix()
et al).
For non-character inputs, the methods attempt to mimic R as closely as
possible. So ddmatrix(1:3, 5, 7)
produces the distributed analogue
of matrix(1:3, 5, 7)
.
For character inputs, you may also specify additional parametric family information.
The functions predicated with .local
generate data with a fixed local
dimension, i.e., each processor gets an identical amount of data. Likewise,
the remaining functions generate a fixed global amount of data, and each
processor may or may not have an identical amount of local data.
To ensure good random number generation, you should only consider using the
character methods with the comm.set.seed()
function from pbdMPI which
uses the method of L'Ecuyer via the rlecuyer package.