#define W 32 #define H 32 struct Box { unsigned int r[32] ; }; #define littleW 3 #define bigW 23 #define littleOptions ((W-littleW+1)*(H-littleW+1)) #define bigOptions ((W-bigW+1)*(H-bigW+1)) #define littleSection (1< using namespace std; Box little[littleOptions] ; Box big[bigOptions] ; void bitsout( unsigned int n ); void boxout( Box bj ) ; int main() { cout << "bigOptions = " << bigOptions << endl; cout << "littleOptions = " << littleOptions << endl; cout << "littleSection = " << littleSection << endl; for ( int i = 0 ; i < littleOptions ; i ++ ) { for ( int h=0; h < H ; h ++ ) { little[i].r[h]=0; } int ix = i % (W-littleW+1) ; int iy = i / (W-littleW+1) ; for ( int row = iy ; row < iy +littleW ; row ++ ) { little[i].r[row] = littleSection << ix ; } } for ( int i = 0 ; i < bigOptions ; i ++ ) { for ( int h=0; h < H ; h ++ ) { big[i].r[h]=0; } int ix = i % (W-bigW+1) ; int iy = i / (W-bigW+1) ; for ( int row = iy ; row < iy +bigW ; row ++ ) { big[i].r[row] = bigSection << ix ; } } if(0){ for ( int j = 0 ; j < bigOptions/100 ; j ++ ) { cout << j << " th state of big dude" << endl; boxout(big[j]); } for ( int i = 0 ; i < littleOptions/100 ; i ++ ) { cout << i << " th state of little dude " << endl; boxout( little[i] ); } } cout << "Single small-particle states" <= 0 ; i -- ) { two_to_power_i = (1<