|
ORE Studio 0.0.4
|
Context for controlling synthetic data generation. More...
#include <generation_context.hpp>

Public Member Functions | |
| generation_context (std::uint64_t seed) | |
| Constructs a generation context with a specific seed. | |
| generation_context () | |
| Constructs a generation context with a random seed. | |
| std::uint64_t | seed () const |
| Returns the seed used for this context. | |
| int | random_int (int min, int max) |
| Generates a random integer in the specified range. | |
| bool | random_bool (double probability=0.5) |
| Generates a random boolean with specified probability of true. | |
| template<typename T > | |
| const T & | pick (const std::vector< T > &items) |
| Picks a random element from a vector. | |
| template<typename T , std::size_t N> | |
| const T & | pick (const std::array< T, N > &items) |
| Picks a random element from an array. | |
| boost::uuids::uuid | generate_uuid () |
| Generates a UUID v7 based on the context's random state. | |
| std::chrono::system_clock::time_point | past_timepoint (int years_back=3) |
| Generates a random timestamp within the past N years. | |
| std::string | alphanumeric (std::size_t length) |
| Generates an alphanumeric string of specified length. | |
Context for controlling synthetic data generation.
This class provides controlled random generation with a configurable seed to ensure repeatable results. All random values should be generated through this context to maintain consistency.
|
explicit |
Constructs a generation context with a specific seed.
| seed | The seed for the random number generator. |