unmatvec: Unmatvec Folding of Matrix

Description Usage Arguments Value References See Also Examples

View source: R/rTensor_Misc.R

Description

The inverse operation to matvec-methods, turning a matrix into a Tensor. For a full account of matrix folding/unfolding operations, consult Kolda and Bader (2009).

Usage

1
unmatvec(mat, modes = NULL)

Arguments

mat

matrix to be folded into a Tensor

modes

the modes of the output Tensor

Value

Tensor object with modes given by modes

References

T. Kolda, B. Bader, "Tensor decomposition and applications". SIAM Applied Mathematics and Applications 2009.

See Also

matvec-methods, fold, k_fold

Examples

1
2
3
tnsr <- new("Tensor",3L,c(3L,4L,5L),data=runif(60))
matT1<-matvec(tnsr)
identical(unmatvec(matT1,modes=c(3,4,5)),tnsr)

jamesyili/rTensor documentation built on May 18, 2019, 11:22 a.m.