| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GiGaHash< TYPE > Class Template Reference

Hashing function to be used in a conjunction with GiGaMap and GiGaHashMap classes. More...

#include <GiGaHash.h>

List of all members.


Public Member Functions

size_t operator() (const TYPE &key) const

Detailed Description

template<class TYPE>
class GiGaHash< TYPE >

Hashing function to be used in a conjunction with GiGaMap and GiGaHashMap classes.

The function is from B.Straustrup book.

The code actually is imported from LHCb Calo software.

Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
27/04/2002

Definition at line 34 of file GiGaHash.h.


Member Function Documentation

template<class TYPE>
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   };


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:01:16 2011 for GiGa by doxygen 1.4.7