kronecker.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:barvikron 作者: catch22 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号