46 template <
class _Type>
50 return std::hash<_Type> {}(i);
54 template <
class _Type1,
class _Type2>
56 get (_Type1
const& i, _Type2
const& j)
58 return get<_Type1> (i) ^ (get<_Type2> (j) << 1);
62 template <
class _Arg0,
class... _Args>
64 get (_Arg0
const& arg0, _Args
const&...args)
66 return get (arg0,
get (args...));
82 #define CEPS_HASH3_PRECISION 1.e-12
std::basic_string< CepsChar > CepsString
C++ format string.
CepsSize CepsHash
Hashes for distributed data.
float CepsReal
Need single precision floating point.
int64_t CepsSHash
Hashes for coordinates.
CepsArray3< CepsReal > CepsReal3D
Three real scalars, used like this for compatibility in polynomials.
constexpr CepsHash get(_Type const &i)
get a hash from a single value
CepsHash3 getHash3(const CepsReal3D &xyz)
Get a triple hash from real coordinates.
A namespace for all utility methods.
void checkNanOrInf(CepsReal v, CepsString message="")
Stops if value is NaN or infty.
A triple hash to be used for coordinates (multiplied *10^12 then truncated)
CepsSHash h1
One hash for each coordinate.