Provides dense and decomposed tensor classes for R together with operations that use an API similar to the MATLAB Tensor Toolbox, including matricized products, contractions, reshaping helpers, and symmetry utilities. Selected kernels can delegate to `xtensor`/`Rcpp` backends for performance.
tensory provides dense and decomposed tensor classes together with an API
similar to the MATLAB Tensor Toolbox for R users.
Details
The tensory package provides tensor algebra tools for R with an API
similar to the MATLAB Tensor Toolbox. It includes dense tensors, matricized
tensors, and decomposed tensor representations, with selected operations
able to delegate to optimized C++ backends.
Key Features
R6-based tensor classes for dense and decomposed representations
Operations with names and semantics similar to the MATLAB Tensor Toolbox such as
ttm(),ttt(),ttv(),permute(), andcontract()Dense helpers for unfolding, vectorization, symmetry checks, and matricized tensor products
Optional C++ acceleration hooks via
xtensorandRcpp
Performance
The package is structured so dense operations can use optimized C++ implementations when available while preserving an R-friendly interface and predictable tensor shapes.