(self)
return cyclic_form
This is used to convert to the cyclic notation
        from the canonical notation. Singletons are omitted.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> Permutation.print_cyclic = False
        >>> p = Permutation([0, 3, 1, 2])
        >>> p.cyclic_form
        [[1, 3, 2]]
        >>> Permutation([1, 0, 2, 4, 3, 5]).cyclic_form
        [[0, 1], [3, 4]]

        See Also
        ========

        array_form, full_cyclic_form
This is used to convert to the cyclic notation
        from the canonical notation. Singletons are omitted.
This is used to convert to the cyclic notation from the canonical notation . Singletons are omitted .
def cyclic_form(self):
        """
        This is used to convert to the cyclic notation
        from the canonical notation. Singletons are omitted.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> Permutation.print_cyclic = False
        >>> p = Permutation([0, 3, 1, 2])
        >>> p.cyclic_form
        [[1, 3, 2]]
        >>> Permutation([1, 0, 2, 4, 3, 5]).cyclic_form
        [[0, 1], [3, 4]]

        See Also
        ========

        array_form, full_cyclic_form
        """
        if self._cyclic_form is not None:
            return list(self._cyclic_form)
        array_form = self.array_form
        unchecked = [True] * len(array_form)
        cyclic_form = []
        for i in range(len(array_form)):
            if unchecked[i]:
                cycle = []
                cycle.append(i)
                unchecked[i] = False
                j = i
                while unchecked[array_form[j]]:
                    j = array_form[j]
                    cycle.append(j)
                    unchecked[j] = False
                if len(cycle) > 1:
                    cyclic_form.append(cycle)
                    assert cycle == list(minlex(cycle, is_set=True))
        cyclic_form.sort()
        self._cyclic_form = cyclic_form[:]
        return cyclic_form
def cyclic_form ( self ) : if self . _cyclic_form is not None : return list ( self . _cyclic_form ) array_form = self . array_form unchecked = [ True ] * len ( array_form ) cyclic_form = [ ] for i in range ( len ( array_form ) ) : if unchecked [ i ] : cycle = [ ] cycle . append ( i ) unchecked [ i ] = False j = i while unchecked [ array_form [ j ] ] : j = array_form [ j ] cycle . append ( j ) unchecked [ j ] = False if len ( cycle ) > 1 : cyclic_form . append ( cycle ) assert cycle == list ( minlex ( cycle , is_set = True ) ) cyclic_form . sort ( ) self . _cyclic_form = cyclic_form [ : ] return cyclic_form