private void init ( List < T > list ) { this . list = list ; indexes = new int [ list . size ( ) ] ; counters = new int [ list . size ( ) ] ; for ( int i = 0 ; i < indexes . length ; i ++ ) { counters [ i ] = indexes [ i ] = i ; } total = 1 ; for ( int i = 2 ; i <= indexes . length ; i ++ ) { total *= i ; } permutation = 0 ; }
Initializes the permutation for a new list