mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Create biergarten brewery pipeline project (#199)
This commit is contained in:
16
pipeline/src/data_generation/mock/deterministic_hash.cc
Normal file
16
pipeline/src/data_generation/mock/deterministic_hash.cc
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @file data_generation/mock/deterministic_hash.cc
|
||||
* @brief Implements a stable hash combiner used by MockGenerator to derive
|
||||
* repeatable pseudo-random indices from location input.
|
||||
*/
|
||||
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
|
||||
#include "data_generation/mock_generator.h"
|
||||
|
||||
size_t MockGenerator::DeterministicHash(const Location& location) {
|
||||
size_t seed = 0;
|
||||
boost::hash_combine(seed, location.city);
|
||||
boost::hash_combine(seed, location.country);
|
||||
return seed;
|
||||
}
|
||||
Reference in New Issue
Block a user