% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3_operations.R
\name{multiply_sparse}
\alias{multiply_sparse}
\title{Sparse-aware matrix multiplication (generic)}
\usage{
multiply_sparse(x, y, ...)
}
\arguments{
\item{x}{An \code{HDF5Matrix}.}

\item{y}{An \code{HDF5Matrix}. Must be in the same HDF5 file as \code{x}.}

\item{...}{Additional arguments forwarded to the method.}
}
\value{
A new \code{HDF5Matrix} containing the product.
}
\description{
Generic function for block-wise sparse matrix multiplication.
The method for \code{HDF5Matrix} computes \code{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.
}
\examples{
\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)

}

}
\seealso{
\code{\link{multiply_sparse.HDF5Matrix}}
}
