unmatvec-methods {DelayedTensor} | R Documentation

## Unmatvec Folding of 2D DelayedArray

### Description

The inverse operation to `matvec-methods`, turning a matrix into a Tensor. For a full account of matrix folding/unfolding operations, consult Kolda and Bader (2009).

### Usage

    unmatvec(mat, modes = NULL)

    ## S4 method for signature 'DelayedArray'
    unmatvec(mat, modes)

### Arguments

`mat` | DelayedArray object (only 2D)
`modes` | the modes of the output DelayedArray

### Details

This function is an extension of the `unmatvec` by DelayedArray.

This is a wrapper function to `fold`.

### Value

DelayedArray object with modes given by `modes`

### References

T. Kolda, B. Bader, "Tensor decomposition and applications". SIAM Applied Mathematics and Applications 2009.

### See Also

`fold`, `matvec`

### Examples

    library("DelayedRandomArray")
    darr <- RandomUnifArray(c(2,3,4))
    matT1 <- matvec(darr)
    identical(
        as.array(unmatvec(matT1, modes=c(2,3,4))),
        as.array(darr))

[Package DelayedTensor version 1.0.0 Index]