本文整理汇总了Python中sympy.combinatorics.named_groups.DihedralGroup.schreier_sims方法的典型用法代码示例。如果您正苦于以下问题:Python DihedralGroup.schreier_sims方法的具体用法?Python DihedralGroup.schreier_sims怎么用?Python DihedralGroup.schreier_sims使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.combinatorics.named_groups.DihedralGroup
的用法示例。
在下文中一共展示了DihedralGroup.schreier_sims方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_strip
# 需要导入模块: from sympy.combinatorics.named_groups import DihedralGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.DihedralGroup import schreier_sims [as 别名]
def test_strip():
D = DihedralGroup(5)
D.schreier_sims()
member = Permutation([4, 0, 1, 2, 3])
not_member1 = Permutation([0, 1, 4, 3, 2])
not_member2 = Permutation([3, 1, 4, 2, 0])
identity = Permutation([0, 1, 2, 3, 4])
res1 = _strip(member, D.base, D.basic_orbits, D.basic_transversals)
res2 = _strip(not_member1, D.base, D.basic_orbits, D.basic_transversals)
res3 = _strip(not_member2, D.base, D.basic_orbits, D.basic_transversals)
assert res1[0] == identity
assert res1[1] == len(D.base) + 1
assert res2[0] == not_member1
assert res2[1] == len(D.base) + 1
assert res3[0] != identity
assert res3[1] == 2