View source: R/S3_operations.R
| multiply_sparse | R Documentation |
Generic function for block-wise sparse matrix multiplication.
The method for HDF5Matrix computes x %*% y using the
BigDataStatMeth sparse multiplication algorithm, which skips all-zero
blocks and is more efficient when one or both matrices are highly sparse.
multiply_sparse(x, y, ...)
x |
An |
y |
An |
... |
Additional arguments forwarded to the method. |
A new HDF5Matrix containing the product.
multiply_sparse.HDF5Matrix
fn <- tempfile(fileext = ".h5")
X <- hdf5_create_matrix(fn, "data/A", data = matrix(rnorm(100), 10, 10))
X <- hdf5_create_matrix(fn, "data/B", data = matrix(rnorm(100), 10, 10))
A <- hdf5_matrix(fn, "data/A")
B <- hdf5_matrix(fn, "data/B")
C <- multiply_sparse(A, B)
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.