'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 also
true groups:
>>> G = tetrahedron.pgroup
>>> G.is_group
True
Also 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([
(0 1)(2 3),
(3),
(1 2 3),
(1 3 2),
(0 3 1),
(0 2 3),
(0 3)(1 2),
(0 1 3),
(3)(0 2 1),
(0 3 2),
(3)(0 1 2),
(0 2)(1 3)])
>>> _.is_group
True'

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))
