as_tensor: Tensor Coercion

Description Usage Arguments Value Examples

Description

This function transforms an input numeric vector or matrix into a proper tensor object defined as a 3x3 definite positive symmetric matrix.

Usage

1
as_tensor(x, validate = TRUE, ...)

Arguments

x

A numeric vector of size 6 storing the 6 unique components of a tensor or a 3x3 numeric matrix.

validate

A boolean which is TRUE if the input type should be checked or FALSE otherwise (default: TRUE).

twice

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

Value

A 3x3 symmetric postive definite matrix stored as a tensor object.

Examples

1
2
v <- seq_len(6L)
as_tensor(v)

astamm/fdatractography documentation built on May 12, 2019, 5:37 a.m.