BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
GUI::RealSpace::GeometricID::KeyHash Struct Reference

Description

Hash functor for Key objects.

Definition at line 61 of file geometry_inc.h.

Public Member Functions

std::size_t operator() (const Key &key) const noexcept
 

Member Function Documentation

◆ operator()()

std::size_t GUI::RealSpace::GeometricID::KeyHash::operator() ( const Key key) const
noexcept

Definition at line 40 of file geometry_inc.cpp.

41 {
42  {
43  size_t h1 = std::hash<int>{}(static_cast<int>(key.id));
44  size_t h2 = std::hash<float>{}(key.p1);
45  size_t h3 = std::hash<float>{}(key.p2);
46  size_t h4 = std::hash<float>{}(key.p3);
47  return h1 ^ (h2 ^ (h3 ^ h4));
48  }
49 }

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