rTensor (version 1.4)

vec-methods: Tensor Vec

Description

Turns the tensor into a single vector, following the convention that earlier indices vary slower than later indices.

Usage

vec(tnsr)

# S4 method for Tensor vec(tnsr)

Arguments

tnsr

the Tensor instance

Value

vector with length prod(x@modes)

Details

vec(tnsr)

References

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

Examples

Run this code
# NOT RUN {
tnsr <- rand_tensor(c(4,5,6,7))
vec(tnsr)
# }

Run the code above in your browser using DataLab