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

Hash function for OpenMS::ProteinHit. More...

#include <OpenMS/METADATA/ProteinHit.h>

Public Member Functions

std::size_t operator() (const OpenMS::ProteinHit &hit) const noexcept
 

Detailed Description

Hash function for OpenMS::ProteinHit.

Computes a hash based on all fields used in operator==:

  • score (double)
  • rank (UInt)
  • accession (String)
  • sequence (String)
  • coverage (double)
  • modifications (set of position-modification pairs)
Note
MetaInfoInterface is not included in the hash for performance reasons. This means two ProteinHit objects that differ only in meta values will have the same hash but compare unequal with operator==. This is valid as the hash contract only requires that equal objects have equal hashes.

Member Function Documentation

◆ operator()()

std::size_t operator() ( const OpenMS::ProteinHit hit) const
inlinenoexcept