|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
Unified generative infrastructure for stochastic and procedural algorithms. More...
#include <Stochastic.hpp>
Collaboration diagram for MayaFlux::Kinesis::Stochastic::Stochastic:Public Member Functions | |
| Stochastic (Algorithm algo=Algorithm::UNIFORM) | |
| Constructs generator with specified algorithm. | |
| void | seed (uint64_t seed) |
| Seeds entropy source. | |
| void | set_algorithm (Algorithm algo) |
| Changes active algorithm. | |
| Algorithm | get_algorithm () const |
| Gets current algorithm. | |
| void | configure (const std::string &key, std::any value) |
| Configures algorithm-specific parameters. | |
| std::optional< std::any > | get_config (const std::string &key) const |
| Gets configuration parameter. | |
| double | operator() (double min, double max) |
| Generates single value in range. | |
| double | at (double x, double y=0.0, double z=0.0) |
| Multi-dimensional generation (Perlin, spatial noise) | |
| std::vector< double > | batch (double min, double max, size_t count) |
| Batch generation. | |
| void | reset_state () |
| Resets internal state for stateful algorithms. | |
| const GeneratorState & | state () const |
| Gets current internal state. | |
| GeneratorState & | state_mutable () |
| Gets mutable internal state. | |
Private Member Functions | |
| double | generate_memoryless (double min, double max) |
| double | generate_stateful (double min, double max) |
| double | generate_perlin_impl (double x, double y, double z) |
| double | generate_gendy_impl (double min, double max) |
| double | generate_brownian_impl (double min, double max) |
| double | generate_colored_noise_impl (double min, double max) |
| void | validate_range (double min, double max) const |
| void | rebuild_distributions_if_needed (double min, double max) |
| double | fast_uniform () noexcept |
Private Attributes | |
| std::mt19937 | m_engine |
| uint64_t | m_xorshift_state |
| Algorithm | m_algorithm |
| GeneratorState | m_state |
| std::map< std::string, std::any > | m_config |
| std::normal_distribution< double > | m_normal_dist { 0.0, 1.0 } |
| std::exponential_distribution< double > | m_exponential_dist { 1.0 } |
| double | m_cached_min { 0.0 } |
| double | m_cached_max { 1.0 } |
| bool | m_dist_dirty { true } |
Unified generative infrastructure for stochastic and procedural algorithms.
Provides mathematical primitives for controlled randomness and procedural generation across all computational domains. Unlike traditional random number generators focused on independent samples, Stochastic embraces both memoryless distributions and stateful processes that evolve over time.
Treats stochastic generation as fundamental mathematical infrastructure rather than domain-specific processing. The same primitives that generate sonic textures can drive visual phenomena, parametric modulation, or data synthesis - the numbers themselves are discipline-agnostic.
Memoryless Distributions (each call independent):
Stateful Processes (evolution over successive calls):
Memoryless generation:
Stateful evolution:
Multi-dimensional generation:
Definition at line 117 of file Stochastic.hpp.