BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MatrixFresnelMap::HashKVector Class Reference

Provides a hash function for a 3-vector of doubles, for use in MatrixFresnelMap. More...

Public Member Functions

size_t operator() (const kvector_t &kvec) const noexcept
 Returns hash value of a 3-vector, computed by exclusive-or of the component hash values. More...
 

Detailed Description

Provides a hash function for a 3-vector of doubles, for use in MatrixFresnelMap.

Definition at line 52 of file MatrixFresnelMap.h.

Member Function Documentation

◆ operator()()

size_t MatrixFresnelMap::HashKVector::operator() ( const kvector_t kvec) const
noexcept

Returns hash value of a 3-vector, computed by exclusive-or of the component hash values.

Definition at line 27 of file MatrixFresnelMap.cpp.

28 {
29  return std::hash<double>{}(kvec.x()) ^ std::hash<double>{}(kvec.y())
30  ^ std::hash<double>{}(kvec.z());
31 }
T z() const
Returns z-component in cartesian coordinate system.
Definition: BasicVector3D.h:67
T y() const
Returns y-component in cartesian coordinate system.
Definition: BasicVector3D.h:65
T x() const
Returns x-component in cartesian coordinate system.
Definition: BasicVector3D.h:63

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