Unfolds the tensor into a matrix, with the modes in rs onto the rows and modes in cs onto the columns. Note that c(rs,cs) must have the same elements (order doesn't matter) as x@modes. Within the rows and columns, the order of the unfolding is determined by the order of the modes. This convention is consistent with Kolda and Bader (2009).
methods
unfold(tnsr, row_idx, col_idx)
Arguments
tnsr: the Tensor instance
row_idx: the indices of the modes to map onto the row space
col_idx: the indices of the modes to map onto the column space
Returns
matrix with prod(row_idx) rows and prod(col_idx) columns
T. Kolda, B. Bader, "Tensor decomposition and applications". SIAM Applied Mathematics and Applications 2009, Vol. 51, No. 3 (September 2009), pp. 455-500. URL: https://www.jstor.org/stable/25662308.