当前位置: 首页>>代码示例>>Python>>正文


Python SymmetricGroup.schreier_sims方法代码示例

本文整理汇总了Python中sympy.combinatorics.named_groups.SymmetricGroup.schreier_sims方法的典型用法代码示例。如果您正苦于以下问题:Python SymmetricGroup.schreier_sims方法的具体用法?Python SymmetricGroup.schreier_sims怎么用?Python SymmetricGroup.schreier_sims使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sympy.combinatorics.named_groups.SymmetricGroup的用法示例。


在下文中一共展示了SymmetricGroup.schreier_sims方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_verify_bsgs

# 需要导入模块: from sympy.combinatorics.named_groups import SymmetricGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.SymmetricGroup import schreier_sims [as 别名]
def test_verify_bsgs():
    S = SymmetricGroup(5)
    S.schreier_sims()
    base = S.base
    strong_gens = S.strong_gens
    assert _verify_bsgs(S, base, strong_gens) is True
    assert _verify_bsgs(S, base[:-1], strong_gens) is False
    assert _verify_bsgs(S, base, S.generators) is False
开发者ID:A-turing-machine,项目名称:sympy,代码行数:10,代码来源:test_testutil.py

示例2: test_baseswap

# 需要导入模块: from sympy.combinatorics.named_groups import SymmetricGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.SymmetricGroup import schreier_sims [as 别名]
def test_baseswap():
    S = SymmetricGroup(4)
    S.schreier_sims()
    base = S.base
    strong_gens = S.strong_gens
    assert base == [0, 1, 2]
    deterministic = S.baseswap(base, strong_gens, 1, randomized=False)
    randomized = S.baseswap(base, strong_gens, 1)
    assert deterministic[0] == [0, 2, 1]
    assert _verify_bsgs(S, deterministic[0], deterministic[1]) is True
    assert randomized[0] == [0, 2, 1]
    assert _verify_bsgs(S, randomized[0], randomized[1]) is True
开发者ID:sixpearls,项目名称:sympy,代码行数:14,代码来源:test_perm_groups.py

示例3: test_orbits_transversals_from_bsgs

# 需要导入模块: from sympy.combinatorics.named_groups import SymmetricGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.SymmetricGroup import schreier_sims [as 别名]
def test_orbits_transversals_from_bsgs():
    S = SymmetricGroup(4)
    S.schreier_sims()
    base = S.base
    strong_gens = S.strong_gens
    strong_gens_distr = _distribute_gens_by_base(base, strong_gens)
    result = _orbits_transversals_from_bsgs(base, strong_gens_distr)
    orbits = result[0]
    transversals = result[1]
    base_len = len(base)
    for i in range(base_len):
        for el in orbits[i]:
            assert transversals[i][el](base[i]) == el
            for j in range(i):
                assert transversals[i][el](base[j]) == base[j]
    order = 1
    for i in range(base_len):
        order *= len(orbits[i])
    assert S.order() == order
开发者ID:jenshnielsen,项目名称:sympy,代码行数:21,代码来源:test_util.py


注:本文中的sympy.combinatorics.named_groups.SymmetricGroup.schreier_sims方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。