deltatensor.RdThe delta tensor is the tensor equivalent of the identity.
delta.tensor(d,mark="'",dn=NULL,by=NULL)a tensor with dimension c(d,mark(d,mark))
$$E_{i_1\ldots i_n j_1\ldots j_n}=\delta_{i_1j_1}\ldots\delta_{i_nj_n}$$
delta.tensor(c(a=2,b=3))
#> , , 1, 1
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 0 0
#>
#> , , 2, 1
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 0 0 0
#> [2,] 1 0 0
#>
#> , , 1, 2
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 0 1 0
#> [2,] 0 0 0
#>
#> , , 2, 2
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 0 0 0
#> [2,] 0 1 0
#>
#> , , 1, 3
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 0 0 1
#> [2,] 0 0 0
#>
#> , , 2, 3
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 0 0 0
#> [2,] 0 0 1
#>
#> attr(,"class")
#> [1] "tensor"