tensor_unfold_cpp: Tensor Unfolding (Matricization) for Synthetic Interventions

View source: R/RcppExports.R

tensor_unfold_cppR Documentation

Tensor Unfolding (Matricization) for Synthetic Interventions

Description

Tensor Unfolding (Matricization) for Synthetic Interventions

Usage

tensor_unfold_cpp(T_cube, mode)

Arguments

T_cube

A 3D array (cube) of dimensions (n1, n2, n3)

mode

The mode to unfold along (1, 2, or 3)

Value

A numeric matrix: the mode-mode unfolding (matricization) of T_cube, with dimensions ⁠n1 x (n2 * n3)⁠, ⁠n2 x (n1 * n3)⁠, or ⁠n3 x (n1 * n2)⁠ for mode 1, 2, or 3 respectively.


coresynth documentation built on Aug. 28, 2026, 1:06 a.m.