ttt: Inner product of tensor X and Y

Description Usage Arguments Value Examples

View source: R/ttt.R

Description

ttt(X,Y,dims) computes the inner product of tensors X and Y in the dimensions specified by the vector dims. The sizes of the dimensions specified by dims must match, which is size(X, dims) must equal size(Y, dims).

Usage

1
ttt(X, Y, dims)

Arguments

X

A tensor instance.

Y

A tensor instance.

dims

The indices of the modes to map onto the column space.

Value

mat

The inner product of tensors X and Y in the dimensions specified by the vector dims, which is a matrix.

Examples

1
2
3
 X = as.tensor(array(runif(24), c(3, 4, 2)));
 Y = as.tensor(array(runif(24), c(3, 4, 2)));
 Z = ttt(X, Y, 1:2)

kusakehan/TEReg documentation built on May 30, 2019, 7:17 a.m.