#include <GiGaHash.h>
Public Member Functions | |
size_t | operator() (const TYPE &key) const |
The function is from B.Straustrup book.
The code actually is imported from LHCb Calo software.
Definition at line 34 of file GiGaHash.h.
size_t GiGaHash< TYPE >::operator() | ( | const TYPE & | key | ) | const [inline] |
Definition at line 36 of file GiGaHash.h.
00037 { 00038 size_t res = 0 ; 00039 size_t len = sizeof(TYPE) ; 00040 const char* p = reinterpret_cast<const char*>( &key ); 00041 while( len-- ) { res = ( res << 1 ) ^ *p++ ; } 00042 return res; 00043 };