static int hash ( int n ) { int hash = 5381 ; hash = ( ( hash << 5 ) + hash ) + ( n & 0xFF ) ; /* hash * 33 + c */ hash = ( ( hash << 5 ) + hash ) + ( ( n >> 8 ) & 0xFF ) ; hash = ( ( hash << 5 ) + hash ) + ( ( n >> 16 ) & 0xFF ) ; hash = ( ( hash << 5 ) + hash ) + ( ( n >> 24 ) & 0xFF ) ; hash &= 0x7FFFFFFF ; return hash ; }
makes a hash out of an int