本文整理汇总了Python中sympy.combinatorics.named_groups.CyclicGroup类的典型用法代码示例。如果您正苦于以下问题:Python CyclicGroup类的具体用法?Python CyclicGroup怎么用?Python CyclicGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CyclicGroup类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_schreier_vector
def test_schreier_vector():
G = CyclicGroup(50)
v = [0]*50
v[23] = -1
assert G.schreier_vector(23) == v
H = DihedralGroup(8)
assert H.schreier_vector(2) == [0, 1, -1, 0, 0, 1, 0, 0]
L = SymmetricGroup(4)
assert L.schreier_vector(1) == [1, -1, 0, 0]
开发者ID:sixpearls,项目名称:sympy,代码行数:9,代码来源:test_perm_groups.py
示例2: test_CyclicGroup
def test_CyclicGroup():
G = CyclicGroup(10)
elements = list(G.generate())
assert len(elements) == 10
assert (G.commutator()).order() == 1
assert G.is_abelian == True
H = CyclicGroup(1)
assert H.order() == 1
L = CyclicGroup(2)
assert L.order() == 2
开发者ID:hector1618,项目名称:sympy,代码行数:10,代码来源:test_named_groups.py
示例3: test_CyclicGroup
def test_CyclicGroup():
G = CyclicGroup(10)
elements = list(G.generate())
assert len(elements) == 10
assert (G.derived_subgroup()).order() == 1
assert G.is_abelian is True
H = CyclicGroup(1)
assert H.order() == 1
L = CyclicGroup(2)
assert L.order() == 2
开发者ID:nthorne,项目名称:sympy,代码行数:10,代码来源:test_named_groups.py
示例4: test_schreier_sims_incremental
def test_schreier_sims_incremental():
identity = Permutation([0, 1, 2, 3, 4])
TrivialGroup = PermutationGroup([identity])
base, strong_gens = TrivialGroup.schreier_sims_incremental(base=[0, 1, 2])
assert _verify_bsgs(TrivialGroup, base, strong_gens) is True
S = SymmetricGroup(5)
base, strong_gens = S.schreier_sims_incremental(base=[0, 1, 2])
assert _verify_bsgs(S, base, strong_gens) is True
D = DihedralGroup(2)
base, strong_gens = D.schreier_sims_incremental(base=[1])
assert _verify_bsgs(D, base, strong_gens) is True
A = AlternatingGroup(7)
gens = A.generators[:]
gen0 = gens[0]
gen1 = gens[1]
gen1 = rmul(gen1, ~gen0)
gen0 = rmul(gen0, gen1)
gen1 = rmul(gen0, gen1)
base, strong_gens = A.schreier_sims_incremental(base=[0, 1], gens=gens)
assert _verify_bsgs(A, base, strong_gens) is True
C = CyclicGroup(11)
gen = C.generators[0]
base, strong_gens = C.schreier_sims_incremental(gens=[gen**3])
assert _verify_bsgs(C, base, strong_gens) is True
开发者ID:sixpearls,项目名称:sympy,代码行数:24,代码来源:test_perm_groups.py
示例5: test_is_primitive
def test_is_primitive():
S = SymmetricGroup(5)
assert S.is_primitive() is True
C = CyclicGroup(7)
assert C.is_primitive() is True
开发者ID:sixpearls,项目名称:sympy,代码行数:5,代码来源:test_perm_groups.py
示例6: test_orbit_rep
def test_orbit_rep():
G = DihedralGroup(6)
assert G.orbit_rep(1, 3) in [Permutation([2, 3, 4, 5, 0, 1]),
Permutation([4, 3, 2, 1, 0, 5])]
H = CyclicGroup(4)*G
assert H.orbit_rep(1, 5) is False
开发者ID:sixpearls,项目名称:sympy,代码行数:6,代码来源:test_perm_groups.py
注:本文中的sympy.combinatorics.named_groups.CyclicGroup类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论