@@ -3,17 +3,12 @@ use crate::DetHashSet;
33use  crate :: { 
44    group:: { 
55        orbit:: abstraction:: { FactoredTransversalResolver ,  TransversalResolver } , 
6-         random_perm:: RandPerm , 
76        stabchain:: { base:: Base ,  Stabchain ,  StabchainRecord } , 
8-         Group , 
97    } , 
108    perm:: { actions:: SimpleApplication ,  Action ,  Permutation } , 
119} ; 
1210use  num:: BigUint ; 
1311
14- const  MIN_SIZE :  usize  = 11 ; 
15- const  INITIAL_RUNS :  usize  = 50 ; 
16- 
1712/// Helper struct, used to build the stabilizer chain 
1813pub  struct  RandomBaseChangeBuilder < P ,  A  = SimpleApplication < P > > 
1914where 
@@ -40,19 +35,17 @@ where
4035        V :  TransversalResolver < P ,  A > , 
4136    { 
4237        let  target_order = chain. order ( ) ; 
43-         let  sgs = Group :: from_list ( chain. strong_generating_set ( ) ) ; 
4438        // Create the trivial chain with all the new base points. 
4539        self . chain  = base
4640            . base ( ) 
4741            . iter ( ) 
4842            . cloned ( ) 
4943            . map ( StabchainRecord :: trivial_record) 
5044            . collect :: < Vec < _ > > ( ) ; 
51-         //Random permutation generator. 
52-         let  mut  rand_perm = RandPerm :: new ( MIN_SIZE ,  & sgs,  INITIAL_RUNS ,  rand:: thread_rng ( ) ) ; 
45+         let  mut  rng = rand:: thread_rng ( ) ; 
5346        //Loop till the new chain has the correct order. 
5447        while  self . current_chain_order ( )  < target_order { 
55-             let  g = rand_perm . random_permutation ( ) ; 
48+             let  g = chain . random_element ( & mut  rng ) ; 
5649            let  ( g_dash,  i)  = self . residue_with_dropout ( g) ; 
5750            //If the permutation doesn't sift through then add it as a new generator at level i. 
5851            if  i < base. base ( ) . len ( )  { 
0 commit comments