00001
00021 #ifndef __HASH_H__
00022 #define __HASH_H__
00023
00027
00028 #ifdef _WIN32
00029 #define inline __inline // compatible with MS VS 6.0
00030 #endif
00031
00032 #include "hashInt.h"
00033 #include "hashFlt.h"
00034 #include "hashPtr.h"
00035
00039
00043
00047
00048 #ifndef ABS
00049 #define ABS(a) ((a) < 0 ? -(a) : (a))
00050 #endif
00051
00055
00056 int Hash_DefaultHashFunc(int key, int nBins) {
00057 return ABS( ( (key+11)*(key)*7+3 ) % nBins );
00058 }
00059
00063
00064 #endif
00065