(self, method="coset", af=False)
Return iterator to generate the elements of the group

        Iteration is done with one of these methods::

          method='coset'  using the Schreier-Sims coset representation
          method='dimino' using the Dimino method

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

        Examples
        ========

        >>> from sympy.combinatorics import Permutation
        >>> Permutation.print_cyclic = True
        >>> from sympy.combinatorics import PermutationGroup
        >>> from sympy.combinatorics.polyhedron import tetrahedron

        The permutation group given in the tetrahedron object is not
        true groups:

        >>> G = tetrahedron.pgroup
        >>> G.is_group()
        False

        But the group generated by the permutations in the tetrahedron
        pgroup -- even the first two -- is a proper group:

        >>> H = PermutationGroup(G[0], G[1])
        >>> J = PermutationGroup(list(H.generate())); J
        PermutationGroup([
            Permutation(0, 1)(2, 3),
            Permutation(3),
            Permutation(1, 2, 3),
            Permutation(1, 3, 2),
            Permutation(0, 3, 1),
            Permutation(0, 2, 3),
            Permutation(0, 3)(1, 2),
            Permutation(0, 1, 3),
            Permutation(3)(0, 2, 1),
            Permutation(0, 3, 2),
            Permutation(3)(0, 1, 2),
            Permutation(0, 2)(1, 3)])
        >>> _.is_group()
        True
Return iterator to generate the elements of the group
Return iterator to generate the elements of the group
def generate(self, method="coset", af=False):
        """Return iterator to generate the elements of the group

        Iteration is done with one of these methods::

          method='coset'  using the Schreier-Sims coset representation
          method='dimino' using the Dimino method

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

        Examples
        ========

        >>> from sympy.combinatorics import Permutation
        >>> Permutation.print_cyclic = True
        >>> from sympy.combinatorics import PermutationGroup
        >>> from sympy.combinatorics.polyhedron import tetrahedron

        The permutation group given in the tetrahedron object is not
        true groups:

        >>> G = tetrahedron.pgroup
        >>> G.is_group()
        False

        But the group generated by the permutations in the tetrahedron
        pgroup -- even the first two -- is a proper group:

        >>> H = PermutationGroup(G[0], G[1])
        >>> J = PermutationGroup(list(H.generate())); J
        PermutationGroup([
            Permutation(0, 1)(2, 3),
            Permutation(3),
            Permutation(1, 2, 3),
            Permutation(1, 3, 2),
            Permutation(0, 3, 1),
            Permutation(0, 2, 3),
            Permutation(0, 3)(1, 2),
            Permutation(0, 1, 3),
            Permutation(3)(0, 2, 1),
            Permutation(0, 3, 2),
            Permutation(3)(0, 1, 2),
            Permutation(0, 2)(1, 3)])
        >>> _.is_group()
        True
        """
        if method == "coset":
            return self.generate_schreier_sims(af)
        elif method == "dimino":
            return self.generate_dimino(af)
        else:
            raise NotImplementedError('No generation defined for %s' % method)
def generate ( self , method = "coset" , af = False ) : if method == "coset" : return self . generate_schreier_sims ( af ) elif method == "dimino" : return self . generate_dimino ( af ) else : raise NotImplementedError ( 'No generation defined for %s' % method )