Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
Wrapper around dict which provides the functionality of a disjoint cycle.

A cycle shows the rule to use to move subsets of elements to obtain
a permutation. The Cycle class is more flexible that Permutation in
that 1) all elements need not be present in order to investigate how
multiple cycles act in sequence and 2) it can contain singletons:

>>> from sympy.combinatorics.permutations import Perm, Cycle

A Cycle will automatically parse a cycle given as a tuple on the rhs:(more...)

src/s/y/sympy-HEAD/sympy/printing/tests/test_str.py   sympy(Download)
def test_Permutation_Cycle():
    from sympy.combinatorics import Permutation, Cycle
 
    # general principle: economically, canonically show all moved elements
    # and the size of the permutation.
 
    for p, s in [
        (Cycle(),
        'Cycle()'),
        (Cycle(2),
        (Cycle(2),
        'Cycle(2)'),
        (Cycle(2, 1),
        'Cycle(1, 2)'),
        (Cycle(1, 2)(5)(6, 7)(10),

src/s/y/sympy-0.7.5/sympy/printing/tests/test_str.py   sympy(Download)
def test_Permutation_Cycle():
    from sympy.combinatorics import Permutation, Cycle
 
    # general principle: economically, canonically show all moved elements
    # and the size of the permutation.
 
    for p, s in [
        (Cycle(),
        'Cycle()'),
        (Cycle(2),
        (Cycle(2),
        'Cycle(2)'),
        (Cycle(2, 1),
        'Cycle(1, 2)'),
        (Cycle(1, 2)(5)(6, 7)(10),