Update documentation

This commit is contained in:
Aaron Po
2026-04-08 22:24:23 -04:00
parent 7807f0bc2a
commit b31be494d7
28 changed files with 487 additions and 93 deletions

View File

@@ -1,3 +1,9 @@
/**
* @file data_generation/mock/data.cpp
* @brief Defines static lookup tables used by MockGenerator for deterministic
* brewery names, descriptions, usernames, and bios.
*/
#include <string>
#include <vector>

View File

@@ -1,12 +1,18 @@
/**
* @file data_generation/mock/deterministic_hash.cpp
* @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 <string>
#include "data_generation/mock_generator.h"
std::size_t MockGenerator::DeterministicHash(const std::string& a,
const std::string& b) {
std::size_t seed = std::hash<std::string>{}(a);
const std::size_t mixed = std::hash<std::string>{}(b);
seed ^= mixed + 0x9e3779b97f4a7c15ULL + (seed << 6) + (seed >> 2);
seed = (seed << 13) | (seed >> ((sizeof(std::size_t) * 8) - 13));
std::size_t seed = 0;
boost::hash_combine(seed, a);
boost::hash_combine(seed, b);
return seed;
}

View File

@@ -1,3 +1,9 @@
/**
* @file data_generation/mock/generate_brewery.cpp
* @brief Builds deterministic brewery names and descriptions by hashing city
* and country into fixed mock phrase catalogs.
*/
#include <string>
#include "data_generation/mock_generator.h"
@@ -10,7 +16,8 @@ auto MockGenerator::GenerateBrewery(const std::string& city_name,
const std::string& adjective =
kBreweryAdjectives.at(hash % kBreweryAdjectives.size());
const std::string& noun = kBreweryNouns.at((hash / 7) % kBreweryNouns.size());
const std::string& noun =
kBreweryNouns.at((hash / 7) % kBreweryNouns.size());
const std::string& base_description =
kBreweryDescriptions.at((hash / 13) % kBreweryDescriptions.size());

View File

@@ -1,3 +1,9 @@
/**
* @file data_generation/mock/generate_user.cpp
* @brief Generates deterministic mock user profiles by hashing locale values
* into predefined username and bio collections.
*/
#include <functional>
#include <string>

View File

@@ -1,3 +1,9 @@
/**
* @file data_generation/mock/load.cpp
* @brief Provides MockGenerator initialization behavior, which is a no-op load
* path that logs readiness without model resources.
*/
#include <spdlog/spdlog.h>
#include <string>