当前位置: 首页>>代码示例>>Python>>正文


Python CartanType.rank方法代码示例

本文整理汇总了Python中cartan_type.CartanType.rank方法的典型用法代码示例。如果您正苦于以下问题:Python CartanType.rank方法的具体用法?Python CartanType.rank怎么用?Python CartanType.rank使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cartan_type.CartanType的用法示例。


在下文中一共展示了CartanType.rank方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: WeylDim

# 需要导入模块: from cartan_type import CartanType [as 别名]
# 或者: from cartan_type.CartanType import rank [as 别名]
def WeylDim(ct, coeffs):
    """
    The Weyl Dimension Formula.
    
    INPUT:
    
    
    -  ``type`` - a Cartan type
    
    -  ``coeffs`` - a list of nonnegative integers
    
    
    The length of the list must equal the rank type[1]. A dominant
    weight hwv is constructed by summing the fundamental weights with
    coefficients from this list. The dimension of the irreducible
    representation of the semisimple complex Lie algebra with highest
    weight vector hwv is returned.
    
    EXAMPLES:

    For `SO(7)`, the Cartan type is `B_3`, so::
    
        sage: WeylDim(['B',3],[1,0,0]) # standard representation of SO(7)
        7
        sage: WeylDim(['B',3],[0,1,0]) # exterior square
        21
        sage: WeylDim(['B',3],[0,0,1]) # spin representation of spin(7)
        8
        sage: WeylDim(['B',3],[1,0,1]) # sum of the first and third fundamental weights
        48
        sage: [WeylDim(['F',4],x) for x in [1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
        [52, 1274, 273, 26]
        sage: [WeylDim(['E', 6], x) for x in [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0]]
        [1, 78, 27, 351, 351, 351, 27, 650, 351]
    """
    ct = CartanType(ct)
    lattice = RootSystem(ct).ambient_space()
    rank = ct.rank()
    fw = lattice.fundamental_weights()
    hwv = lattice.sum(coeffs[i]*fw[i+1] for i in range(min(rank, len(coeffs))))
    return lattice.weyl_dimension(hwv)
开发者ID:pombredanne,项目名称:sage-1,代码行数:43,代码来源:root_system.py


注:本文中的cartan_type.CartanType.rank方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。