OpenMS
Loading...
Searching...
No Matches
PeptideHit::SequenceChargeHash Class Reference

Hash functor for PeptideHit based on sequence and charge. More...

#include <OpenMS/METADATA/PeptideHit.h>

Public Member Functions

std::size_t operator() (const PeptideHit &hit) const noexcept
 

Detailed Description

Hash functor for PeptideHit based on sequence and charge.

This hasher computes a portable hash based on the peptide sequence (including modifications) and charge state. This represents the "identity" of a peptide hit for most practical purposes.

Note
This hash is NOT consistent with operator== which also compares score, rank, evidences, annotations, and meta info. Use this hasher when you want to identify unique peptides by sequence+charge.

Example usage:

std::unordered_set<PeptideHit, PeptideHit::SequenceChargeHash, PeptideHit::SequenceChargeEqual> unique_hits;

Member Function Documentation

◆ operator()()

std::size_t operator() ( const PeptideHit hit) const
inlinenoexcept