CArl
Code Arlequin / C++ implementation
carl::PointHash_3D Struct Reference

#include <common_functions.h>

Public Member Functions

std::size_t operator() (const std::vector< long > &k) const
 

Detailed Description

Definition at line 51 of file common_functions.h.

Member Function Documentation

std::size_t carl::PointHash_3D::operator() ( const std::vector< long > &  k) const
inline

Definition at line 52 of file common_functions.h.

53  {
54  long prime0 = 73856093;
55  long prime1 = 19349669;
56  long prime2 = 83492791;
57  long primeN = 2038074743;
58 
59  return ( ( k[0] * prime0 ) ^ ( k[1] * prime1 ) ^ ( k[2] * prime2 ) ) % primeN;
60  }

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