Learn R Programming

MESS (version 0.5.12)

tracemp: Fast computation of trace of matrix product

Description

Fast computation of the trace of the matrix product trace(t(A)

Usage

tracemp(A, B)

Value

The trace of the matrix product

Arguments

A

A matrix with dimensions n*k.

B

A matrix with dimenions n*k.

Author

Claus Ekstrom <claus@rprimer.dk>

Examples

Run this code

A <- matrix(1:12, ncol=3)
tracemp(A, A)

Run the code above in your browser using DataLab