matr_Commutator_Kperm {MultiStatM} | R Documentation |
Produces any permutation of kronecker products of vectors of any length. An option for sparse matrix is provided, by default a non-sparse matrix is produced. Using sparse matrices increases computation times, but far less memory is required.
matr_Commutator_Kperm(perm, dims, useSparse = FALSE)
perm |
vector indicating the permutation of the order in the Kronecker product, |
dims |
vector indicating the dimensions of the vectors, use dims <- d if all dimensions are equal |
useSparse |
T or F. |
A square permutation matrix of size prod(dims)
. If useSparse=TRUE
an object of the class
"dgCMatrix" is produced.
Holmquist B (1996) The d-variate vector Hermite polynomial of order. Linear Algebra and its Applications 237/238, 155-190.
Gy., Terdik, Multivariate statistical methods - going beyond the linear, Springer 2021, 1.2.4 Commuting T-Products of Vectors.
Other Matrices and commutators:
indx_Commutator_Kmn()
,
indx_Commutator_Kperm()
,
indx_Commutator_Mixing()
,
indx_Commutator_Moment()
,
indx_Elimination()
,
indx_Qplication()
,
indx_Symmetry()
,
indx_UnivMomCum()
,
matr_Commutator_Kmn()
,
matr_Commutator_Mixing()
,
matr_Commutator_Moment()
,
matr_Elimination()
,
matr_Qplication()
,
matr_Symmetry()
dims <- c(2,3,2)
perm <- c(1,3,2)
matr_Commutator_Kperm(perm,dims)
perm <- c(3,1,4,2)
dims <- 4 # All vectors with dimension 4
# If all dimensions are equal, using dims <- d instead of
# dims <- c(d,d,d,d,d,d,d,d) will be much faster.
# For example, for perm <- c(2,4,6,1,3,8,5,7) and d <- 3
# matr_Commutator_Kperm(c(2,4,6,1,3,8,5,7),3) ## requires 2.11 secs
# matr_Commutator_Kperm(c(2,4,6,1,3,8,5,7),c(3,3,3,3,3,3,3,3)) ## requires 1326.47 secs