Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 signature 'Tensor'
vec(tnsr)

Arguments

tnsr

the Tensor instance

Details

vec(tnsr)

Value

vector with length prod(x@modes)

References

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

Examples

tnsr <- rand_tensor(c(4,5,6,7))
vec(tnsr)

rTensor

Tools for Tensor Analysis and Decomposition

v1.4.8
GPL (>= 2)
Authors
James Li and Jacob Bien and Martin Wells
Initial release
2021-05-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.