8 : m_engine(
std::random_device {}())
10 , m_xorshift_state(
std::random_device {}() | (static_cast<uint64_t>(
std::random_device {}()) << 32))
18 m_engine.seed(
static_cast<std::mt19937::result_type
>(
seed));
82 return (*
this)(0.0, 1.0);
91 std::vector<double> result;
92 result.reserve(
count);
94 for (
size_t i = 0; i <
count; ++i) {
95 result.push_back((*
this)(min, max));
114 double raw_value = 0.0;
123 return std::clamp(raw_value, min, max);
130 return min + raw_value * (max - min);
134 std::poisson_distribution<int> dist(
static_cast<int>(max - min));
135 return static_cast<double>(dist(
m_engine));
161 double step_size = 0.01;
162 if (
auto cfg =
get_config(
"step_size"); cfg.has_value()) {
163 step_size = std::any_cast<double>(*cfg);
183 "Stochastic: min must be <= max. Received min: {}, max: {}", min, max);
192 const double range = max - min;
196 if (
auto cfg =
get_config(
"spread"); cfg.has_value()) {
197 spread = std::any_cast<double>(*cfg);
199 m_normal_dist = std::normal_distribution<double>(0.0, range / spread);
#define MF_WARN(comp, ctx,...)
void validate_range(double min, double max) const
double generate_stateful(double min, double max)
uint64_t m_xorshift_state
double generate_gendy_impl(double min, double max)
std::map< std::string, std::any > m_config
void configure(const std::string &key, std::any value)
Configures algorithm-specific parameters.
void rebuild_distributions_if_needed(double min, double max)
std::vector< double > batch(double min, double max, size_t count)
Batch generation.
void reset_state()
Resets internal state for stateful algorithms.
double generate_brownian_impl(double min, double max)
std::optional< std::any > get_config(const std::string &key) const
Gets configuration parameter.
double generate_perlin_impl(double x, double y, double z)
double operator()(double min, double max)
Generates single value in range.
std::exponential_distribution< double > m_exponential_dist
double at(double x, double y=0.0, double z=0.0)
Multi-dimensional generation (Perlin, spatial noise)
void set_algorithm(Algorithm algo)
Changes active algorithm.
std::normal_distribution< double > m_normal_dist
double fast_uniform() noexcept
double generate_memoryless(double min, double max)
double generate_colored_noise_impl(double min, double max)
void seed(uint64_t seed)
Seeds entropy source.
Unified generative infrastructure for stochastic and procedural algorithms.
@ Runtime
General runtime operations (default fallback)
@ Kinesis
General mathematical and physics algorithns.
Algorithm
Stochastic and procedural generation algorithms.