Crossprod: crossprod

30-CrossprodR Documentation

crossprod

Description

Calculates the cross product of two MPCR matrices. It uses BLAS routine gemm() for A X B operations and syrk() for A X A^T operations.

Usage

## S4 method for signature 'Rcpp_MPCR'
crossprod(x, y = NULL)

## S4 method for signature 'Rcpp_MPCR'
tcrossprod(x, y = NULL)

Arguments

x

An MPCR object.

y

Either NULL, or an MPCR matrix.

Details

Calculates cross product of two MPCR matrices performs:
x %*% y , t(x) %*% x
This function uses blas routine gemm() for A X B operations & syrk() for A X A^T operations.

Value

An MPCR matrix.

Examples

    
    library(MPCR)
    x <- as.MPCR(1:16,4,4,"single")
    y <- as.MPCR(1:20,4,5,"double")

    z <- crossprod(x)     # t(x) x
    z <- tcrossprod(x)    # x t(x)
    z <- crossprod(x,y)   # x y
    z <- x %*% y          # x y
    

MPCR documentation built on April 13, 2025, 5:08 p.m.

Related to Crossprod in MPCR...