# 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)
Run the code above in your browser using DataLab