Commit a66062af authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud

algo/core/kmeraffect.h: Provide hash for KmerAffect

This is needed now that we use an unordered_map with a KmerAffect (see
previous commit) as explained here:
parent 1da82cf3
......@@ -174,6 +174,17 @@ bool operator>=(const KmerAffect &a1, const KmerAffect &a2);
bool operator!=(const KmerAffect &a1, const KmerAffect &a2);
ostream &operator<<(ostream &os, const KmerAffect &kmer);
namespace std {
template <>
struct hash<KmerAffect> {
size_t operator()(const KmerAffect &affect) const {
return (affect.getLabel()[0] << 8) | affect.getLength();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment