def kronecker_weight_vpn(dims):
"""
Return VectorPartitionFunction for computing weight multiplicities in
the symmetric algebra Sym(C^prod(dims)) with respect to the maximal torus
of GL(dims[1]) x ... x GL(dims[n]).
"""
# build list of multi-indices
multi_indices = list(itertools.product(*map(range, dims)))
# build matrix such that the r-th row corresponds to the r-th entries of all weights
As = []
for i, dim in enumerate(dims):
A = np.zeros(shape=(dim, len(multi_indices)), dtype=object)
for j, midx in enumerate(multi_indices):
A[midx[i], j] = 1
As.append(A)
A = np.row_stack(As)
return VectorPartitionFunction(A)
评论列表
文章目录