(self)
Schreier-Sims algorithm.

        It computes the generators of the chain of stabilizers
        G > G_{b_1} > .. > G_{b1,..,b_r} > 1
        in which G_{b_1,..,b_i} stabilizes b_1,..,b_i,
        and the corresponding ``s`` cosets.
        An element of the group can be written as the product
        h_1*..*h_s.

        We use the incremental Schreier-Sims algorithm.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> a = Permutation([0, 2, 1])
        >>> b = Permutation([1, 0, 2])
        >>> G = PermutationGroup([a, b])
        >>> G.schreier_sims()
        >>> G.basic_transversals
        [{0: Permutation(2)(0, 1), 1: Permutation(2), 2: Permutation(1, 2)},
         {0: Permutation(2), 2: Permutation(0, 2)}]
Schreier-Sims algorithm.
Schreier - Sims algorithm .
def schreier_sims(self):
        """Schreier-Sims algorithm.

        It computes the generators of the chain of stabilizers
        G > G_{b_1} > .. > G_{b1,..,b_r} > 1
        in which G_{b_1,..,b_i} stabilizes b_1,..,b_i,
        and the corresponding ``s`` cosets.
        An element of the group can be written as the product
        h_1*..*h_s.

        We use the incremental Schreier-Sims algorithm.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> from sympy.combinatorics.perm_groups import PermutationGroup
        >>> a = Permutation([0, 2, 1])
        >>> b = Permutation([1, 0, 2])
        >>> G = PermutationGroup([a, b])
        >>> G.schreier_sims()
        >>> G.basic_transversals
        [{0: Permutation(2)(0, 1), 1: Permutation(2), 2: Permutation(1, 2)},
         {0: Permutation(2), 2: Permutation(0, 2)}]
        """
        if self._transversals:
            return
        base, strong_gens = self.schreier_sims_incremental()
        self._base = base
        self._strong_gens = strong_gens
        if not base:
            self._transversals = []
            self._basic_orbits = []
            return

        strong_gens_distr = _distribute_gens_by_base(base, strong_gens)
        basic_orbits, transversals = _orbits_transversals_from_bsgs(base,\
                strong_gens_distr)
        self._transversals = transversals
        self._basic_orbits = [sorted(x) for x in basic_orbits]
def schreier_sims ( self ) : if self . _transversals : return base , strong_gens = self . schreier_sims_incremental ( ) self . _base = base self . _strong_gens = strong_gens if not base : self . _transversals = [ ] self . _basic_orbits = [ ] return strong_gens_distr = _distribute_gens_by_base ( base , strong_gens ) basic_orbits , transversals = _orbits_transversals_from_bsgs ( base , strong_gens_distr ) self . _transversals = transversals self . _basic_orbits = [ sorted ( x ) for x in basic_orbits ]