本文整理汇总了Python中sage.combinat.posets.posets.Poset.principal_order_filter方法的典型用法代码示例。如果您正苦于以下问题:Python Poset.principal_order_filter方法的具体用法?Python Poset.principal_order_filter怎么用?Python Poset.principal_order_filter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.posets.posets.Poset
的用法示例。
在下文中一共展示了Poset.principal_order_filter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: composition_series_poset
# 需要导入模块: from sage.combinat.posets.posets import Poset [as 别名]
# 或者: from sage.combinat.posets.posets.Poset import principal_order_filter [as 别名]
def composition_series_poset(self, side = 'right'):
"""
Experimental, and apparently broken ...
EXAMPLES::
sage: S = Monoids().Aperiodic().Finite().example(5); S
The finite H-trivial monoid of order preserving maps on {1, 2, 3, 4, 5}
sage: P = S.composition_series_poset(side = 'right')
sage: list(P)
[4, 3, 2, 1, 0]
sage: P.cover_relations()
[]
sage: P = S.composition_series_poset(side = 'left')
sage: list(P)
[4, 3, 2, 1, 0]
sage: P.cover_relations()
"""
from sage.combinat.posets.posets import Poset
Js = self.regular_j_classes_keys()
principal_order_filters = {}
for J in Js:
R = self.lr_regular_class_module(J, side=side)
principal_order_filters[J] = R.composition_series()
import time
print "%s %s: %s %s %s"%(time.strftime("%H:%M:%S"), J, self.simple_module_dimension(J), R.dimension(), principal_order_filters[J])
P = Poset( ( Js, lambda J1, J2: J2 in principal_order_filters[J1] ), facade = True )
from sage.sets.set import Set
assert all( Set( P.principal_order_filter(J) ) == principal_order_filters[J]
for J in Js )
return P