| crossprod {slam} | R Documentation |
Compute the matrix cross-product of a sparse and dense matrix.
tcrossprod_simple_triplet_matrix(x, y = NULL)
x |
a matrix in |
y |
a numeric matrix. |
Provides fast computation of x %*% t(x) and
x %*% t(y) (tcrossprod).
A double matrix, with appropriate dimnames taken from x
and y.
If y (or x) contains any of the special values NA,
NaN, or Inf (if y = NULL) then x is coerced
to matrix and the computation is delegated to tcrossprod.
Christian Buchta
crossprod for dense-on-dense computations.
## x <- matrix(c(1, 0, 0, 2, 1, 0), nrow = 3) x s <- as.simple_triplet_matrix(x) tcrossprod_simple_triplet_matrix(s, x) ## tcrossprod_simple_triplet_matrix(s)