本文整理汇总了Python中sage.combinat.root_system.root_system.RootSystem.root_space方法的典型用法代码示例。如果您正苦于以下问题:Python RootSystem.root_space方法的具体用法?Python RootSystem.root_space怎么用?Python RootSystem.root_space使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.root_system.root_system.RootSystem
的用法示例。
在下文中一共展示了RootSystem.root_space方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ClassicalCrystalOfAlcovePaths
# 需要导入模块: from sage.combinat.root_system.root_system import RootSystem [as 别名]
# 或者: from sage.combinat.root_system.root_system.RootSystem import root_space [as 别名]
#.........这里部分代码省略.........
"""
@staticmethod
def __classcall__(cls, cartan_type, highest_weight):
"""
cartan_type and heighest_weight are lists, which are mutable, this
causes a problem for class UniqueRepresentation, the following code
fixes this problem.
EXAMPLES::
sage: ClassicalCrystalOfAlcovePaths.__classcall__(ClassicalCrystalOfAlcovePaths,['A',3],[0,1,0])
<class 'sage.combinat.crystals.alcove_path.ClassicalCrystalOfAlcovePaths_with_category'>
"""
cartan_type = CartanType(cartan_type)
highest_weight = tuple(highest_weight)
return super(ClassicalCrystalOfAlcovePaths, cls).__classcall__(cls, cartan_type, highest_weight)
def __init__(self, cartan_type, highest_weight):
"""
EXAMPLES::
sage: C = ClassicalCrystalOfAlcovePaths(['A',3],[1,0,0])
sage: C.list()
[[], [0], [0, 1], [0, 1, 2]]
sage: TestSuite(C).run()
"""
Parent.__init__(self, category = ClassicalCrystals())
self._cartan_type = CartanType(cartan_type)
self._name = "The crystal of alcove paths for type %s"%cartan_type
self.chain_cache = {}
self.endweight_cache = {}
self.R = RootSystem(cartan_type)
alpha = self.R.root_space().simple_roots()
Lambda = self.R.weight_space().basis()
self.positive_roots = sorted(self.R.root_space().positive_roots());
self.weight = Lambda[Integer(1)] - Lambda[Integer(1)]
offset = self.R.index_set()[Integer(0)]
for j in self.R.index_set():
self.weight = self.weight + highest_weight[j-offset]*Lambda[j]
self.initial_element = self([])
self.initial_element.chain = self.get_initial_chain(self.weight)
rho = (Integer(1)/Integer(2))*sum(self.positive_roots)
self.initial_element.endweight = rho
self.chain_cache[ str([]) ] = self.initial_element.chain
self.endweight_cache[ str([]) ] = self.initial_element.endweight
self.module_generators = [self.initial_element]
self._list = super(ClassicalCrystalOfAlcovePaths, self).list()
self._digraph = super(ClassicalCrystalOfAlcovePaths, self).digraph()
self._digraph_closure = self.digraph().transitive_closure()
def get_initial_chain(self, highest_weight):
"""
Called internally by __init__() to construct the chain of roots
associated to the highest weight element.
EXAMPLES::
sage: C = ClassicalCrystalOfAlcovePaths(['A',3],[0,1,0])
sage: C.get_initial_chain(RootSystem(['A',3]).weight_space().basis()[1])