| matrix-vector | R Documentation |
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% v
crossprod_mv(M, v)
M |
a matrix of class 'matrix', 'dgCMatrix', 'dsCMatrix', 'tabMatrix', or 'ddiMatrix'. |
v |
a numeric vector. |
For %m*v% the vector Mv and for crossprod_mv the vector
M'v where M' denotes the transpose of M.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.