\donttest{
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)
}multiply_sparse
multiply_sparse
MATRIX_UTILS
1 Description
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.
2 Usage
multiply_sparse(x, y, ...)3 Arguments
| Parameter | Description |
|---|---|
x |
An . |
y |
An . Must be in the same HDF5 file as . |
4 Value
A new containing the product.