sp_prodVec {bigsparser} | R Documentation |
Products with a vector
Description
Products between an SFBM and a vector.
Usage
sp_prodVec(X, y)
sp_cprodVec(X, y)
Arguments
X |
An SFBM. |
y |
A vector of same size of the number of columns of |
Value
-
sp_prodVec()
: the vector which is equivalent toX %*% y
ifX
was a dgCMatrix. -
sp_cprodVec()
: the vector which is equivalent toMatrix::crossprod(X, y)
ifX
was a dgCMatrix.
Examples
spmat <- Matrix::rsparsematrix(1000, 1000, 0.01)
X <- as_SFBM(spmat)
sp_prodVec(X, rep(1, 1000))
sp_cprodVec(X, rep(1, 1000))
[Package bigsparser version 0.7.1 Index]