(self, af=False)
Yield group elements using Dimino's algorithm

        If af == True it yields the array form of the permutations

        References
        ==========

        [1] The Implementation of Various Algorithms for Permutation Groups in
        the Computer Algebra System: AXIOM, N.J. Doye, M.Sc. Thesis

        Examples
        ========

        >>> from sympy.combinatorics import Permutation
        >>> Permutation.print_cyclic = True
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> a = Permutation([0, 2, 1, 3])
        >>> b = Permutation([0, 2, 3, 1])
        >>> g = PermutationGroup([a, b])
        >>> list(g.generate_dimino(af=True))
        [[0, 1, 2, 3], [0, 2, 1, 3], [0, 2, 3, 1],
         [0, 1, 3, 2], [0, 3, 2, 1], [0, 3, 1, 2]]
Yield group elements using Dimino's algorithm
Yield group elements using Dimino s algorithm
def generate_dimino(self, af=False):
        """Yield group elements using Dimino's algorithm

        If af == True it yields the array form of the permutations

        References
        ==========

        [1] The Implementation of Various Algorithms for Permutation Groups in
        the Computer Algebra System: AXIOM, N.J. Doye, M.Sc. Thesis

        Examples
        ========

        >>> from sympy.combinatorics import Permutation
        >>> Permutation.print_cyclic = True
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> a = Permutation([0, 2, 1, 3])
        >>> b = Permutation([0, 2, 3, 1])
        >>> g = PermutationGroup([a, b])
        >>> list(g.generate_dimino(af=True))
        [[0, 1, 2, 3], [0, 2, 1, 3], [0, 2, 3, 1],
         [0, 1, 3, 2], [0, 3, 2, 1], [0, 3, 1, 2]]

        """
        idn = list(range(self.degree))
        order = 0
        element_list = [idn]
        set_element_list = set([tuple(idn)])
        if af:
            yield idn
        else:
            yield _af_new(idn)
        gens = [p._array_form for p in self.generators]

        for i in range(len(gens)):
            # D elements of the subgroup G_i generated by gens[:i]
            D = element_list[:]
            N = [idn]
            while N:
                A = N
                N = []
                for a in A:
                    for g in gens[:i + 1]:
                        ag = _af_rmul(a, g)
                        if tuple(ag) not in set_element_list:
                            # produce G_i*g
                            for d in D:
                                order += 1
                                ap = _af_rmul(d, ag)
                                if af:
                                    yield ap
                                else:
                                    p = _af_new(ap)
                                    yield p
                                element_list.append(ap)
                                set_element_list.add(tuple(ap))
                                N.append(ap)
        self._order = len(element_list)
def generate_dimino ( self , af = False ) : idn = list ( range ( self . degree ) ) order = 0 element_list = [ idn ] set_element_list = set ( [ tuple ( idn ) ] ) if af : yield idn else : yield _af_new ( idn ) gens = [ p . _array_form for p in self . generators ] for i in range ( len ( gens ) ) : # D elements of the subgroup G_i generated by gens[:i] D = element_list [ : ] N = [ idn ] while N : A = N N = [ ] for a in A : for g in gens [ : i + 1 ] : ag = _af_rmul ( a , g ) if tuple ( ag ) not in set_element_list : # produce G_i*g for d in D : order += 1 ap = _af_rmul ( d , ag ) if af : yield ap else : p = _af_new ( ap ) yield p element_list . append ( ap ) set_element_list . add ( tuple ( ap ) ) N . append ( ap ) self . _order = len ( element_list )