本文整理汇总了Python中cartan_type.CartanType.dynkin_diagram方法的典型用法代码示例。如果您正苦于以下问题:Python CartanType.dynkin_diagram方法的具体用法?Python CartanType.dynkin_diagram怎么用?Python CartanType.dynkin_diagram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cartan_type.CartanType
的用法示例。
在下文中一共展示了CartanType.dynkin_diagram方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DynkinDiagram
# 需要导入模块: from cartan_type import CartanType [as 别名]
# 或者: from cartan_type.CartanType import dynkin_diagram [as 别名]
def DynkinDiagram(*args):
"""
INPUT:
- ``ct`` - a Cartan Type
Returns a Dynkin diagram for type ct.
The edge multiplicities are encoded as edge labels. This uses the
convention in Kac / Fulton Harris, Representation theory / Wikipedia
(http://en.wikipedia.org/wiki/Dynkin_diagram). That is for i != j::
j --k--> i <==> a_ij = -k
<==> -scalar(coroot[i], root[j]) = k
<==> multiple arrows point from the longer root
to the shorter one
EXAMPLES::
sage: DynkinDiagram(['A', 4])
O---O---O---O
1 2 3 4
A4
sage: DynkinDiagram(['A',1],['A',1])
O
1
O
2
A1xA1
sage: R = RootSystem("A2xB2xF4")
sage: DynkinDiagram(R)
O---O
1 2
O=>=O
3 4
O---O=>=O---O
5 6 7 8
A2xB2xF4
SEE ALSO: :func:`CartanType` for a general discussion on Cartan
types and in particular node labeling conventions.
"""
if len(args) == 0:
return DynkinDiagram_class()
ct = CartanType(*args)
if hasattr(ct, "dynkin_diagram"):
return ct.dynkin_diagram()
else:
raise ValueError, "Dynkin diagram data not yet hardcoded for type %s"%ct
示例2: DynkinDiagram
# 需要导入模块: from cartan_type import CartanType [as 别名]
# 或者: from cartan_type.CartanType import dynkin_diagram [as 别名]
def DynkinDiagram(*args):
r"""
Return a Dynkin diagram for type ``ct``.
INPUT:
- ``ct`` -- a Cartan Type
The edge multiplicities are encoded as edge labels. This uses the
convention in Hong and Kang, Kac, Fulton Harris, and crystals. This is the
**opposite** convention in Bourbaki and Wikipedia's Dynkin diagram
(:wikipedia:`Dynkin_diagram`). That is for `i \neq j`::
i <--k-- j <==> a_ij = -k
<==> -scalar(coroot[i], root[j]) = k
<==> multiple arrows point from the shorter root
to the longer one
For example, in type `C_2`, we have::
sage: C2 = DynkinDiagram(['C',2]); C2
O=<=O
1 2
C2
sage: C2.cartan_matrix()
[ 2 -2]
[-1 2]
However Bourbaki would have the Cartan matrix as:
.. MATH::
\begin{bmatrix}
2 & -1 \\
-2 & 2
\end{bmatrix}.
EXAMPLES::
sage: DynkinDiagram(['A', 4])
O---O---O---O
1 2 3 4
A4
sage: DynkinDiagram(['A',1],['A',1])
O
1
O
2
A1xA1
sage: R = RootSystem("A2xB2xF4")
sage: DynkinDiagram(R)
O---O
1 2
O=>=O
3 4
O---O=>=O---O
5 6 7 8
A2xB2xF4
.. SEEALSO::
:func:`CartanType` for a general discussion on Cartan
types and in particular node labeling conventions.
"""
if len(args) == 0:
return DynkinDiagram_class()
ct = CartanType(*args)
if hasattr(ct, "dynkin_diagram"):
return ct.dynkin_diagram()
else:
raise ValueError, "Dynkin diagram data not yet hardcoded for type %s"%ct