mat2vec: Tensor-To-Vector Representation

Description Usage Arguments Value Examples

Description

Tensor-To-Vector Representation

Usage

1
mat2vec(tensor, twice = FALSE)

Arguments

tensor

A 3x3 symmetric postive definite matrix.

twice

A boolean that says whether off-diagonal tensor elements were doubled in vector representation (default: FALSE).

Value

A vector of size 6 storing the 6 unique components of the input tensor.

Examples

1
2
D <- cbind(c(1, 2, 4), c(2, 3, 5), c(4, 5, 6))
mat2vec(D)

astamm/bayesr documentation built on May 10, 2019, 2:05 p.m.