本文整理汇总了Python中sympy.combinatorics.named_groups.SymmetricGroup.is_alt_sym方法的典型用法代码示例。如果您正苦于以下问题:Python SymmetricGroup.is_alt_sym方法的具体用法?Python SymmetricGroup.is_alt_sym怎么用?Python SymmetricGroup.is_alt_sym使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.combinatorics.named_groups.SymmetricGroup
的用法示例。
在下文中一共展示了SymmetricGroup.is_alt_sym方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_is_alt_sym
# 需要导入模块: from sympy.combinatorics.named_groups import SymmetricGroup [as 别名]
# 或者: from sympy.combinatorics.named_groups.SymmetricGroup import is_alt_sym [as 别名]
def test_is_alt_sym():
G = DihedralGroup(10)
assert G.is_alt_sym() is False
S = SymmetricGroup(10)
N_eps = 10
_random_prec = {'N_eps': N_eps,
0: Permutation([[2], [1, 4], [0, 6, 7, 8, 9, 3, 5]]),
1: Permutation([[1, 8, 7, 6, 3, 5, 2, 9], [0, 4]]),
2: Permutation([[5, 8], [4, 7], [0, 1, 2, 3, 6, 9]]),
3: Permutation([[3], [0, 8, 2, 7, 4, 1, 6, 9, 5]]),
4: Permutation([[8], [4, 7, 9], [3, 6], [0, 5, 1, 2]]),
5: Permutation([[6], [0, 2, 4, 5, 1, 8, 3, 9, 7]]),
6: Permutation([[6, 9, 8], [4, 5], [1, 3, 7], [0, 2]]),
7: Permutation([[4], [0, 2, 9, 1, 3, 8, 6, 5, 7]]),
8: Permutation([[1, 5, 6, 3], [0, 2, 7, 8, 4, 9]]),
9: Permutation([[8], [6, 7], [2, 3, 4, 5], [0, 1, 9]])}
assert S.is_alt_sym(_random_prec=_random_prec) is True
A = AlternatingGroup(10)
_random_prec = {'N_eps': N_eps,
0: Permutation([[1, 6, 4, 2, 7, 8, 5, 9, 3], [0]]),
1: Permutation([[1], [0, 5, 8, 4, 9, 2, 3, 6, 7]]),
2: Permutation([[1, 9, 8, 3, 2, 5], [0, 6, 7, 4]]),
3: Permutation([[6, 8, 9], [4, 5], [1, 3, 7, 2], [0]]),
4: Permutation([[8], [5], [4], [2, 6, 9, 3], [1], [0, 7]]),
5: Permutation([[3, 6], [0, 8, 1, 7, 5, 9, 4, 2]]),
6: Permutation([[5], [2, 9], [1, 8, 3], [0, 4, 7, 6]]),
7: Permutation([[1, 8, 4, 7, 2, 3], [0, 6, 9, 5]]),
8: Permutation([[5, 8, 7], [3], [1, 4, 2, 6], [0, 9]]),
9: Permutation([[4, 9, 6], [3, 8], [1, 2], [0, 5, 7]])}
assert A.is_alt_sym(_random_prec=_random_prec) is False