本文整理汇总了Python中sage.combinat.root_system.cartan_type.CartanType.is_simply_laced方法的典型用法代码示例。如果您正苦于以下问题:Python CartanType.is_simply_laced方法的具体用法?Python CartanType.is_simply_laced怎么用?Python CartanType.is_simply_laced使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.root_system.cartan_type.CartanType
的用法示例。
在下文中一共展示了CartanType.is_simply_laced方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_simply_laced [as 别名]
def __classcall_private__(cls, cartan_type, wt=None):
r"""
Normalize the input arguments to ensure unique representation.
EXAMPLES::
sage: La = RootSystem(['A', 2]).weight_lattice().fundamental_weights()
sage: RC = crystals.RiggedConfigurations(La[1])
sage: RC2 = crystals.RiggedConfigurations(['A', 2], La[1])
sage: RC is RC2
True
"""
if wt is None:
wt = cartan_type
cartan_type = wt.parent().cartan_type()
else:
cartan_type = CartanType(cartan_type)
wt_lattice = cartan_type.root_system().weight_lattice()
wt = wt_lattice(wt)
if not cartan_type.is_simply_laced():
vct = cartan_type.as_folding()
return CrystalOfNonSimplyLacedRC(vct, wt)
return super(CrystalOfRiggedConfigurations, cls).__classcall__(cls, wt)
示例2: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_simply_laced [as 别名]
def __classcall_private__(cls, ct, c=1, t=None, base_ring=None, prefix=('a', 's', 'ac')):
"""
Normalize input to ensure a unique representation.
EXAMPLES::
sage: R1 = algebras.RationalCherednik(['B',2], 1, 1, QQ)
sage: R2 = algebras.RationalCherednik(CartanType(['B',2]), [1,1], 1, QQ, ('a', 's', 'ac'))
sage: R1 is R2
True
"""
ct = CartanType(ct)
if not ct.is_finite():
raise ValueError("the Cartan type must be finite")
if base_ring is None:
if t is None:
base_ring = QQ
else:
base_ring = t.parent()
if t is None:
t = base_ring.one()
else:
t = base_ring(t)
# Normalize the parameter c
if isinstance(c, (tuple, list)):
if ct.is_simply_laced():
if len(c) != 1:
raise ValueError("1 parameter c_s must be given for simply-laced types")
c = (base_ring(c[0]),)
else:
if len(c) != 2:
raise ValueError("2 parameters c_s must be given for non-simply-laced types")
c = (base_ring(c[0]), base_ring(c[1]))
else:
c = base_ring(c)
if ct.is_simply_laced():
c = (c,)
else:
c = (c, c)
return super(RationalCherednikAlgebra, cls).__classcall__(cls, ct, c, t, base_ring, tuple(prefix))
示例3: __classcall_private__
# 需要导入模块: from sage.combinat.root_system.cartan_type import CartanType [as 别名]
# 或者: from sage.combinat.root_system.cartan_type.CartanType import is_simply_laced [as 别名]
def __classcall_private__(cls, cartan_type):
r"""
Normalize the input arguments to ensure unique representation.
EXAMPLES::
sage: RC1 = crystals.infinity.RiggedConfigurations(CartanType(['A',3]))
sage: RC2 = crystals.infinity.RiggedConfigurations(['A',3])
sage: RC2 is RC1
True
"""
cartan_type = CartanType(cartan_type)
if not cartan_type.is_simply_laced():
vct = cartan_type.as_folding()
return InfinityCrystalOfNonSimplyLacedRC(vct)
return super(InfinityCrystalOfRiggedConfigurations, cls).__classcall__(cls, cartan_type)