TPIE

2362a60
tpie::hash< std::pair< T1, T2 > > Struct Template Reference

Default hashing function for std::pair. More...

#include <tpie/hash.h>

Public Member Functions

size_t operator() (const std::pair< T1, T2 > &e) const
 Calculate std::pair hash. More...
 

Public Attributes

hash< T1 > h1
 
hash< T2 > h2
 

Detailed Description

template<typename T1, typename T2>
struct tpie::hash< std::pair< T1, T2 > >

Default hashing function for std::pair.

Template Parameters
T1First part of std::pair.
T2Second part of std::pair.

Definition at line 67 of file hash.h.

Member Function Documentation

template<typename T1 , typename T2 >
size_t tpie::hash< std::pair< T1, T2 > >::operator() ( const std::pair< T1, T2 > &  e) const
inline

Calculate std::pair hash.

Parameters
sPair to hash.

Definition at line 75 of file hash.h.

75  {
76  return h1(e.first) + h2(e.second) * 99181;
77  }

The documentation for this struct was generated from the following file: