OpenMS
Loading...
Searching...
No Matches
hash< OpenMS::DataValue > Struct Reference

Hash function for DataValue. More...

#include <OpenMS/DATASTRUCTURES/DataValue.h>

Public Member Functions

std::size_t operator() (const OpenMS::DataValue &dv) const noexcept
 

Detailed Description

Hash function for DataValue.

Hashes based on the value type, value content, and unit information. This ensures consistency with operator== which compares all these fields.

Note
For DOUBLE_VALUE, operator== uses epsilon comparison (fabs < 1e-6), so we round to 6 decimal places before hashing to maintain consistency. For DOUBLE_LIST, we use toString() since list comparison is exact.

Member Function Documentation

◆ operator()()

std::size_t operator() ( const OpenMS::DataValue dv) const
inlinenoexcept