
Last chance! 50% off unlimited learning
Sale ends in
Functions for matrix-vector multiplies like %*%
and crossprod
,
but often faster for the matrix types supported. The return value is always a
numeric vector.
M %m*v% vcrossprod_mv(M, v)
a matrix of class 'matrix', 'dgCMatrix', 'dsCMatrix', 'tabMatrix', or 'ddiMatrix'.
a numeric vector.
For %m*v%
the vector crossprod_mv
the vector
# NOT RUN {
M <- matrix(rnorm(10*10), 10, 10)
x <- rnorm(10)
M %m*v% x
crossprod_mv(M, x)
M <- Matrix::rsparsematrix(100, 100, nnz=100)
x <- rnorm(100)
M %m*v% x
crossprod_mv(M, x)
# }
Run the code above in your browser using DataLab