#include "header.h" /* determine the state of a permutation */ int state(uniform *u, int dim, int begin) { uniform perm[5]; /*5 is the dimension of u*/ unsigned map[60]={39,38,37,36,41,40,54,55,56,57,58,59,49,48,52,53,50,51,42, 43,44,45,46,47,33,32,31,30,35,34,12,13,14,15,16,17,29,28, 24,25,27,26,21,20,19,18,23,22,2,3,5,4,1,0,10,11,9,8,6,7 }; register int i, j, index, max; int tmp, state=0; for(i=0; i<5; ++i){ index=(begin+i)%5; perm[i]=u[index]; } for(i=4; i>=1; --i){ max=perm[0]; index=0; for(j=1; j<=i; ++j){ if( perm[j]