Belle II Software development
hash< Belle2::SubGraphID > Struct Reference

customized hash-function for being able to use unordered_map. More...

#include <SubGraphID.h>

Public Member Functions

std::size_t operator() (const Belle2::SubGraphID &graphID) const
 Create Hash value from graphID.
 

Detailed Description

customized hash-function for being able to use unordered_map.

Definition at line 202 of file SubGraphID.h.

Member Function Documentation

◆ operator()()

std::size_t operator() ( const Belle2::SubGraphID graphID) const
inline

Create Hash value from graphID.

Parameters
graphID: the subgraph ID
Returns
the hash value

Definition at line 207 of file SubGraphID.h.

208 {
209 std::size_t hashVal = 0;
210 for (unsigned iD : graphID) {
211 hashVal = std::hash<unsigned>()(iD) ^ hashVal;
212 ++hashVal;
213 }
214 return hashVal;
215 }

The documentation for this struct was generated from the following file: