MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
API/Random.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace MayaFlux {
4
5namespace Kinesis::Stochastic {
6 class Stochastic;
7}
8
9//-------------------------------------------------------------------------
10// Random Number Generation
11//-------------------------------------------------------------------------
12
13/**
14 * @brief Generates a uniform random number
15 * @param start Lower bound (inclusive)
16 * @param end Upper bound (exclusive)
17 * @return Random number with uniform distribution
18 *
19 * Uses the random number generator from the default engine.
20 */
21MAYAFLUX_API double get_uniform_random(double start = 0, double end = 1);
22
23/**
24 * @brief Generates a gaussian (normal) random number
25 * @param start Lower bound for scaling
26 * @param end Upper bound for scaling
27 * @return Random number with gaussian distribution
28 *
29 * Uses the random number generator from the default engine.
30 */
31MAYAFLUX_API double get_gaussian_random(double start = 0, double end = 1);
32
33/**
34 * @brief Generates an exponential random number
35 * @param start Lower bound for scaling
36 * @param end Upper bound for scaling
37 * @return Random number with exponential distribution
38 *
39 * Uses the random number generator from the default engine.
40 */
41MAYAFLUX_API double get_exponential_random(double start = 0, double end = 1);
42
43/**
44 * @brief Generates a poisson random number
45 * @param start Lower bound for scaling
46 * @param end Upper bound for scaling
47 * @return Random number with poisson distribution
48 *
49 * Uses the random number generator from the default engine.
50 */
51MAYAFLUX_API double get_poisson_random(double start = 0, double end = 1);
52
53/**
54 * @brief Get reference to the default random engine
55 * @return Reference to the Stochastic engine instance
56 *
57 * Provides access to the default random engine for advanced usage and configuration.
58 */
60
61/**
62 * @brief Generates a Brownian motion value
63 * @param start Starting value for Brownian motion
64 * @param end Upper bound for scaling
65 * @return Next value in the Brownian motion sequence
66 *
67 * Uses the random number generator from the default engine configured for Brownian motion.
68 * Successive calls will evolve the internal state of the Brownian motion generator, creating a random walk effect.
69 * The "start" parameter can be used to set the initial position of the Brownian motion,
70 * while the "end" parameter can be used to scale the output range.
71 * The generator will maintain its state across calls, allowing for continuous evolution of the Brownian motion sequence.
72 */
73MAYAFLUX_API double get_brownian_motion(double start, double end);
74
75}
Unified generative infrastructure for stochastic and procedural algorithms.
double get_gaussian_random(double start, double end)
Generates a gaussian (normal) random number.
double get_brownian_motion(double start, double end)
Generates a Brownian motion value.
double get_poisson_random(double start, double end)
Generates a poisson random number.
double get_uniform_random(double start, double end)
Generates a uniform random number.
Kinesis::Stochastic::Stochastic & get_random_engine()
Get reference to the default random engine.
Definition API/Random.cpp:9
double get_exponential_random(double start, double end)
Generates an exponential random number.
Main namespace for the Maya Flux audio engine.
Definition LiveAid.hpp:6