| CommutatorIndx | R Documentation |
This function calculates the commutator index based on the specified type. The available types are "Kmn", "Kperm", "Mixing", and "Moment". Depending on the selected type, the corresponding specific function is called.
CommutatorIndx(Type, ...)
Type |
a string specifying the type of commutator index to be calculated. Must be one of "Kmn", "Kperm", "Mixing", or "Moment". |
... |
additional arguments passed to the specific commutator function. |
The function 'CommutatorIndx' acts as a wrapper to call specific commutator functions based on the input 'Type'. See also 'CommutatorMatr' for details.
Type "Kmn": Transforms vec(A) to vec(A^T), where A^T is the transpose of matrix A.
m - Row-dimension.
n - Col-dimension.
A vector of indexes to provide the commutation, transforming vec A to vec of the transposed A.
Type "Kperm": Generates a specified permutation of matrix dimensions.
perm - Vector indicating the permutation of the order in the Kronecker product.
dims - Vector indicating the dimensions of the vectors.
An index vector to produce the permutation of the Kronecker products of vectors of any length.
Type "Mixing": Generates an index for Mixing commutation used in linear algebra transformations involving tensor products.
x - A vector of dimension prod(d1)*prod(d2).
d1 - Dimension of the first group of vectors.
d2 - Dimension of the second group of vectors.
A vector Kx representing the product of the moment commutator and the vector x.
Type "Moment": Generates an index for Moment commutation based on partitioning of moments.
x - A vector of length d^n where n is the length of el_rm.
el_rm - Type of a partition.
d - Dimensionality of the underlying multivariate distribution.
A vector Kx representing the product of the moment commutator and the vector x.
A vector representing the commutator index.
Other Commutators:
CommutatorMatr()
# Kmn example
A <- 1:6
CommutatorIndx(Type = "Kmn", m = 3, n = 2)
# Kperm example
a1 <- c(1, 2)
a2 <- c(2, 3, 4)
a3 <- c(1, 3)
p1 <- a1 %x% a2 %x% a3
CommutatorIndx(Type = "Kperm", perm = c(3, 1, 2), dims = c(2, 3, 2))
# Mixing example
d1 <- c(2, 3, 2)
d2 <- c(3, 2, 2)
x <- 1:(prod(d1) * prod(d2))
CommutatorIndx(Type = "Mixing", x = x, d1 = d1, d2 = d2)
# Moment example
n <- 4
r <- 2
m <- 1
d <- 2
PTA <- PartitionTypeAll(n)
el_r <- PTA$eL_r[[r]][m, ]
x <- 1:d^n
CommutatorIndx(Type = "Moment", x = x, el_rm = el_r, d = d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.