def _stabilizer(degree, generators, alpha):
 orb = [alpha]
 table = {alpha: list(range(degree))}
 table_inv = {alpha: list(range(degree))}
 used = ([False] * degree)
 used[alpha] = True
 gens = [x._array_form for x in generators]
 stab_gens = []
 for b in orb:
  for gen in gens:
   temp = gen[b]
   if (used[temp] is False):
    gen_temp = _af_rmul(gen, table[b])
    orb.append(temp)
    table[temp] = gen_temp
    table_inv[temp] = _af_invert(gen_temp)
    used[temp] = True
   else:
    schreier_gen = _af_rmuln(table_inv[temp], gen, table[b])
    if (schreier_gen not in stab_gens):
     stab_gens.append(schreier_gen)
 return [_af_new(x) for x in stab_gens]

def _stabilizer ( degree , generators , alpha ) : orb = [ alpha ] table = { alpha : list ( range ( degree ) ) } table_inv = { alpha : list ( range ( degree ) ) } used = ( [ False ] * degree ) used [ alpha ] = True gens = [ x . _array_form for x in generators ] stab_gens = [ ] for b in orb : for gen in gens : temp = gen [ b ] if ( used [ temp ] is False ) : gen_temp = _af_rmul ( gen , table [ b ] ) orb . append ( temp ) table [ temp ] = gen_temp table_inv [ temp ] = _af_invert ( gen_temp ) used [ temp ] = True else : schreier_gen = _af_rmuln ( table_inv [ temp ] , gen , table [ b ] ) if ( schreier_gen not in stab_gens ) : stab_gens . append ( schreier_gen ) return [ _af_new ( x ) for x in stab_gens ]
return the stabilizer subgroup of alpha .