mat.mult: Matrix multiplication, Cross and Tcross product.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/matrix.R

Description

Matrix multiplication, Cross and Tcross product.

Usage

1
2
3
mat.mult(x, y)
Crossprod(x,y)
Tcrossprod(x,y)

Arguments

x

A numerical matrix.

y

A numerical matrix.

Details

The functions performs matrix multiplication, croos product and transpose cross product. There are faster(!) than R's function for large matrices. Depending on the computer, maybe higher dimensions are required for the function to make a difference. The function runs in parallel in C++.

Value

A matrix, the result of the matrix multiplication.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>

See Also

transpose, colsums

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
x <- matrnorm(100, 100)
y <- matrnorm(100, 100)
a <- x 
b <- mat.mult(x, y)
b <- Crossprod(x, y)
b <- Tcrossprod(x, y)
x <- NULL
y <- NULL
b <- NULL

## End(Not run)

Example output

Loading required package: Rcpp
Loading required package: RcppZiggurat

Rfast documentation built on Dec. 11, 2021, 9:59 a.m.