vec-methods: Tensor Vec

Description Usage Arguments Details Value References Examples

Description

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

Usage

1
2
3
4
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

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

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