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

Public Member Functions

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

Detailed Description

Definition at line 62 of file geometry_inc.h.

Member Function Documentation

◆ operator()()

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

Definition at line 37 of file geometry_inc.cpp.

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

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