MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Random.cpp
Go to the documentation of this file.
1#include "Random.hpp"
2
3#include "Core.hpp"
6
7namespace MayaFlux {
8
9//-------------------------------------------------------------------------
10// Random Number Generation
11//-------------------------------------------------------------------------
12
13double get_uniform_random(double start, double end)
14{
16 return get_context().get_random_engine()->random_sample(start, end);
17}
18
19double get_gaussian_random(double start, double end)
20{
22 return get_context().get_random_engine()->random_sample(start, end);
23}
24
30
31double get_poisson_random(double start, double end)
32{
34 return get_context().get_random_engine()->random_sample(start, end);
35}
36}
Core engine lifecycle and configuration API.
Nodes::Generator::Stochastics::Random * get_random_engine()
Gets the stochastic signal generator engine.
Definition Engine.hpp:274
void set_type(Utils::distribution type)
Changes the probability distribution type.
double random_sample(double start, double end)
Generates a stochastic value within a specified range.
double get_gaussian_random(double start, double end)
Generates a gaussian (normal) random number.
Definition Random.cpp:19
double get_poisson_random(double start, double end)
Generates a poisson random number.
Definition Random.cpp:31
double get_uniform_random(double start, double end)
Generates a uniform random number.
Definition Random.cpp:13
double get_exponential_random(double start, double end)
Generates an exponential random number.
Definition Random.cpp:25
Core::Engine & get_context()
Gets the default engine instance.
Definition Core.cpp:56
Main namespace for the Maya Flux audio engine.
Definition LiveAid.hpp:6