PAPRECA hybrid off-lattice kMC/MD simulator  2.0.0 (17 September 2024)
PAPRECA::PairHash Class Reference

Utility hash function (struct) for custom typedefs. More...

#include <utilities.h>

Public Member Functions

std::size_t operator() (const std::pair< int, int > &v) const
 

Detailed Description

Utility hash function (struct) for custom typedefs.

Note
This struct is necessary because an std pair is not a primitive datatype. This means that we have to provide a custom hash function for the unordered containers (both map and set). See: https://stackoverflow.com/questions/15160889/how-can-i-make-an-unordered-set-of-pairs-of-integers-in-c. Could also use std functions as a solution.

Member Function Documentation

◆ operator()()

std::size_t PAPRECA::PairHash::operator() ( const std::pair< int, int > &  v) const
inline

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